Merge "Change bp2build to reflect arm_isa refactor"

This commit is contained in:
Trevor Radcliffe 2023-05-16 19:41:08 +00:00 committed by Gerrit Code Review
commit 735013943a
3 changed files with 3 additions and 9 deletions

View file

@ -644,10 +644,7 @@ func TestCcBinaryWithInstructionSet(t *testing.T) {
targets: []testBazelTarget{
{"cc_binary", "foo", AttrNameToString{
"features": `select({
"//build/bazel/platforms/arch:arm": [
"arm_isa_arm",
"-arm_isa_thumb",
],
"//build/bazel/platforms/arch:arm": ["arm_isa_arm"],
"//conditions:default": [],
})`,
"local_includes": `["."]`,

View file

@ -3221,10 +3221,7 @@ func TestCcLibraryWithInstructionSet(t *testing.T) {
`,
ExpectedBazelTargets: makeCcLibraryTargets("foo", AttrNameToString{
"features": `select({
"//build/bazel/platforms/arch:arm": [
"arm_isa_arm",
"-arm_isa_thumb",
],
"//build/bazel/platforms/arch:arm": ["arm_isa_arm"],
"//conditions:default": [],
})`,
"local_includes": `["."]`,

View file

@ -500,7 +500,7 @@ func (ca *compilerAttributes) bp2buildForAxisAndConfig(ctx android.BazelConversi
instructionSet := proptools.StringDefault(props.Instruction_set, "")
if instructionSet == "arm" {
ca.features.SetSelectValue(axis, config, []string{"arm_isa_arm", "-arm_isa_thumb"})
ca.features.SetSelectValue(axis, config, []string{"arm_isa_arm"})
} else if instructionSet != "" && instructionSet != "thumb" {
ctx.ModuleErrorf("Unknown value for instruction_set: %s", instructionSet)
}