Change bp2build to reflect arm_isa refactor
We now rely on a `with_features` clause to effectively disable thumb when `arm_isa_arm` is enabled. Thus, we no longer need to add `-arm_isa_thumb` in bp2build. Bug: 261733820 Test: Unit tests Change-Id: I9da85834855b297a75097ce3a11e101f55bd53f4
This commit is contained in:
@@ -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": `["."]`,
|
||||||
|
@@ -3219,10 +3219,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": `["."]`,
|
||||||
|
@@ -492,7 +492,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)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user