Merge "Handle product_variable asflag for cc_object."
This commit is contained in:
@@ -206,6 +206,34 @@ cc_object {
|
||||
srcs = [
|
||||
"a/b/c.c",
|
||||
],
|
||||
)`,
|
||||
},
|
||||
},
|
||||
{
|
||||
description: "cc_object with product variable",
|
||||
moduleTypeUnderTest: "cc_object",
|
||||
moduleTypeUnderTestFactory: cc.ObjectFactory,
|
||||
moduleTypeUnderTestBp2BuildMutator: cc.ObjectBp2Build,
|
||||
blueprint: `cc_object {
|
||||
name: "foo",
|
||||
include_build_directory: false,
|
||||
product_variables: {
|
||||
platform_sdk_version: {
|
||||
asflags: ["-DPLATFORM_SDK_VERSION=%d"],
|
||||
},
|
||||
},
|
||||
|
||||
bazel_module: { bp2build_available: true },
|
||||
}
|
||||
`,
|
||||
expectedBazelTargets: []string{`cc_object(
|
||||
name = "foo",
|
||||
asflags = [
|
||||
"-DPLATFORM_SDK_VERSION={Platform_sdk_version}",
|
||||
],
|
||||
copts = [
|
||||
"-fno-addrsig",
|
||||
],
|
||||
)`,
|
||||
},
|
||||
},
|
||||
|
Reference in New Issue
Block a user