aboutsummaryrefslogtreecommitdiff
path: root/cc/makevars.go
diff options
context:
space:
mode:
authorPeter Collingbourne <pcc@google.com>2019-07-22 16:36:06 -0700
committerPeter Collingbourne <pcc@google.com>2019-07-25 17:18:22 -0700
commitb0e6143b9bcc7bfb49a2a8d37d1576b6d5c15cc1 (patch)
treefb346d054534f0213a808b47d05445b99eaa19e5 /cc/makevars.go
parent6edff69513a79029d6a6675c49f46da0d5583ba6 (diff)
downloadsoong-b0e6143b9bcc7bfb49a2a8d37d1576b6d5c15cc1.tar.gz
Specify the API level via the triple instead of __ANDROID_API__.
Clang derives the value of __ANDROID_API__ from the triple these days. In a future version of clang I plan to start making the behaviour of the HWASAN pass dependent on the API level in the triple, so it's going to need to be accurate. Test: walleye-userdebug boots Change-Id: Ie5e36b5c8f6dcda084cc12b1160abbdf94765174
Diffstat (limited to 'cc/makevars.go')
-rw-r--r--cc/makevars.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cc/makevars.go b/cc/makevars.go
index 2b49772e2..acac45545 100644
--- a/cc/makevars.go
+++ b/cc/makevars.go
@@ -249,9 +249,9 @@ func makeVarsToolchain(ctx android.MakeVarsContext, secondPrefix string,
}
clangPrefix := secondPrefix + "CLANG_" + typePrefix
- clangExtras := "-target " + toolchain.ClangTriple()
- clangExtras += " -B" + config.ToolPath(toolchain)
+ clangExtras := "-B" + config.ToolPath(toolchain)
+ ctx.Strict(clangPrefix+"TRIPLE", toolchain.ClangTriple())
ctx.Strict(clangPrefix+"GLOBAL_CFLAGS", strings.Join([]string{
toolchain.ClangCflags(),
"${config.CommonClangGlobalCflags}",