bp2build support for instruction_set
Convert `instruction_set: "arm"` to an "arm_isa_arm" bazel feature. Bug: 215719349 Test: go tests Change-Id: Ib976d23d2a57e8c0ab5d83ec994a0b7f3c69a7fe
This commit is contained in:
@@ -2566,3 +2566,29 @@ cc_library {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestCcLibraryWithInstructionSet(t *testing.T) {
|
||||
runCcLibraryTestCase(t, Bp2buildTestCase{
|
||||
ModuleTypeUnderTest: "cc_library",
|
||||
ModuleTypeUnderTestFactory: cc.LibraryFactory,
|
||||
Blueprint: `cc_library {
|
||||
name: "foo",
|
||||
arch: {
|
||||
arm: {
|
||||
instruction_set: "arm",
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
ExpectedBazelTargets: makeCcLibraryTargets("foo", AttrNameToString{
|
||||
"features": `select({
|
||||
"//build/bazel/platforms/arch:arm": [
|
||||
"arm_isa_arm",
|
||||
"-arm_isa_thumb",
|
||||
],
|
||||
"//conditions:default": [],
|
||||
})`,
|
||||
"local_includes": `["."]`,
|
||||
}),
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user