[go: nahoru, domu]

Supporting GKI_BUILD_CONFIG_FRAGMENT on Kleaf

WARNING: Build configs are being deprecated. The support for this will stop once the migration of all configs is completed. Before trying this approach make sure your use case is not covered by flags or by customizing .bazelrc files.

NOTE: If you find a use case for a new flag, please email kernel-team@android.com so we can discuss its addition to Kleaf.

The debug option --gki_build_config_fragment allow developers to use a build config fragment to modify/override the GKI build config for debugging purposes.

The following is an example of how to use this debug option for the virtual_device\aarch64 build (from common-modules/virtual-device).

A developer will need to provide the target containing the fragment(s) to be used. For example if the fragment is build.config.gki.sample.fragment , the following filegroup can be used:

filegroup(
    name = "sample_gki_config_fragment",
    srcs = [
        "build.config.gki.sample.fragment",
    ],
)

This target can now be used like this:

tools/bazel build //common-modules/virtual-device:virtual_device_aarch64 --gki_build_config_fragment=//common-modules/virtual-device:sample_gki_config_fragment