Merge "Add bazel_module properties to cc_defaults" am: 9962daec01
am: b54a6c4457
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1660764 Change-Id: I5a7929beb871164c333dd3289b0d3759dcbdc022
This commit is contained in:
6
cc/cc.go
6
cc/cc.go
@@ -3284,6 +3284,10 @@ func (c *Module) ShouldSupportSdkVersion(ctx android.BaseModuleContext,
|
|||||||
type Defaults struct {
|
type Defaults struct {
|
||||||
android.ModuleBase
|
android.ModuleBase
|
||||||
android.DefaultsModuleBase
|
android.DefaultsModuleBase
|
||||||
|
// Included to support setting bazel_module.label for multiple Soong modules to the same Bazel
|
||||||
|
// target. This is primarily useful for modules that were architecture specific and instead are
|
||||||
|
// handled in Bazel as a select().
|
||||||
|
android.BazelModuleBase
|
||||||
android.ApexModuleBase
|
android.ApexModuleBase
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3330,6 +3334,8 @@ func DefaultsFactory(props ...interface{}) android.Module {
|
|||||||
&RustBindgenClangProperties{},
|
&RustBindgenClangProperties{},
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// Bazel module must be initialized _before_ Defaults to be included in cc_defaults module.
|
||||||
|
android.InitBazelModule(module)
|
||||||
android.InitDefaultsModule(module)
|
android.InitDefaultsModule(module)
|
||||||
|
|
||||||
return module
|
return module
|
||||||
|
@@ -3368,6 +3368,9 @@ func TestDefaults(t *testing.T) {
|
|||||||
shared: {
|
shared: {
|
||||||
srcs: ["baz.c"],
|
srcs: ["baz.c"],
|
||||||
},
|
},
|
||||||
|
bazel_module: {
|
||||||
|
bp2build_available: true,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_library_static {
|
cc_library_static {
|
||||||
|
Reference in New Issue
Block a user