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:
@@ -581,3 +581,32 @@ cc_library {
|
||||
},
|
||||
})
|
||||
}
|
||||
|
||||
func TestCcBinaryWithInstructionSet(t *testing.T) {
|
||||
runCcBinaryTests(t, ccBinaryBp2buildTestCase{
|
||||
description: "instruction set",
|
||||
blueprint: `
|
||||
{rule_name} {
|
||||
name: "foo",
|
||||
arch: {
|
||||
arm: {
|
||||
instruction_set: "arm",
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
targets: []testBazelTarget{
|
||||
{"cc_binary", "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