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
3 changed files with 3 additions and 9 deletions

View File

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

View File

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

View File

@@ -500,7 +500,7 @@ func (ca *compilerAttributes) bp2buildForAxisAndConfig(ctx android.BazelConversi
instructionSet := proptools.StringDefault(props.Instruction_set, "") instructionSet := proptools.StringDefault(props.Instruction_set, "")
if instructionSet == "arm" { 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" { } else if instructionSet != "" && instructionSet != "thumb" {
ctx.ModuleErrorf("Unknown value for instruction_set: %s", instructionSet) ctx.ModuleErrorf("Unknown value for instruction_set: %s", instructionSet)
} }