Add support for writing all Soong config variables into @soong_injection.
Also remove the need to use bp2build_available on soong_config_module_types as we want to convert every single of them into the tree for a complete soong_injection soong_config_variables.bzl file. The variables are split into their bool, value and string types respectively, as they all need to be handled differently on the Bazel product_platform side, as well as for generating constraint values and settings. For example, value variables need to integrate with TemplateVariableInfo, and string variables need to include the string value itself into the select key/constraint value. Sample soong_config_variables.bzl file: https://gist.github.com/jin/cef700bfb20c8656a931306dd71d47e1 Test: CI Bug: 198556411 Change-Id: I8665dd1269a507edb37de62407ed3641564bea5c
This commit is contained in:
@@ -24,23 +24,6 @@ import (
|
||||
"github.com/google/blueprint"
|
||||
)
|
||||
|
||||
type BazelModuleProperties struct {
|
||||
// The label of the Bazel target replacing this Soong module. When run in conversion mode, this
|
||||
// will import the handcrafted build target into the autogenerated file. Note: this may result in
|
||||
// a conflict due to duplicate targets if bp2build_available is also set.
|
||||
Label *string
|
||||
|
||||
// If true, bp2build will generate the converted Bazel target for this module. Note: this may
|
||||
// cause a conflict due to the duplicate targets if label is also set.
|
||||
//
|
||||
// This is a bool pointer to support tristates: true, false, not set.
|
||||
//
|
||||
// To opt-in a module, set bazel_module: { bp2build_available: true }
|
||||
// To opt-out a module, set bazel_module: { bp2build_available: false }
|
||||
// To defer the default setting for the directory, do not set the value.
|
||||
Bp2build_available *bool
|
||||
}
|
||||
|
||||
// BazelTargetModuleProperties contain properties and metadata used for
|
||||
// Blueprint to BUILD file conversion.
|
||||
type BazelTargetModuleProperties struct {
|
||||
|
Reference in New Issue
Block a user