Support tailoring clang --target flag based on min sdk version.

Bug: 215748260
Test: Tested using aquery to verify the --target flag; add added unit

Change-Id: Ifb13509db7d1e110316aa44d55ec9cccaa4b83d1
This commit is contained in:
Yu Liu
2022-03-01 15:44:08 -08:00
parent 2d6e6a1338
commit fc603167f4
14 changed files with 78 additions and 3 deletions

View File

@@ -15,12 +15,13 @@
package bp2build
import (
"android/soong/android"
"android/soong/cc"
"android/soong/genrule"
"fmt"
"strings"
"testing"
"android/soong/android"
"android/soong/cc"
"android/soong/genrule"
)
const (
@@ -127,6 +128,8 @@ func TestBasicCcBinary(t *testing.T) {
keep_symbols_list: ["symbol"],
none: true,
},
sdk_version: "current",
min_sdk_version: "29",
}
`,
targets: []testBazelTarget{
@@ -150,6 +153,8 @@ func TestBasicCcBinary(t *testing.T) {
"keep_symbols_list": ["symbol"],
"none": True,
}`,
"sdk_version": `"current"`,
"min_sdk_version": `"29"`,
},
},
},