Fix ToolchainClangCflags for host bionic
Move these flags from the normal flags to the toolchain flags, since we
want them to always apply.
Test: Add #ifdef __ANDROID__ to crtbegin.c, check to see if it's set for host bionic
Change-Id: I382dd229e3e4a889bc916f6f8e1248c7debb8fad
diff --git a/cc/config/x86_linux_bionic_host.go b/cc/config/x86_linux_bionic_host.go
index bd6cd0e..093876d 100644
--- a/cc/config/x86_linux_bionic_host.go
+++ b/cc/config/x86_linux_bionic_host.go
@@ -54,10 +54,6 @@
// Tell clang where the gcc toolchain is
"--gcc-toolchain=${LinuxBionicGccRoot}",
- // TODO: We're not really android, but we don't have a triple yet b/31393676
- "-U__ANDROID__",
- "-fno-emulated-tls",
-
// This is normally in ClangExtraTargetCflags, but this is considered host
"-nostdlibinc",
})
@@ -142,7 +138,9 @@
}
func (t *toolchainLinuxBionic) ToolchainClangCflags() string {
- return "-m64 -march=x86-64"
+ return "-m64 -march=x86-64" +
+ // TODO: We're not really android, but we don't have a triple yet b/31393676
+ " -U__ANDROID__ -fno-emulated-tls"
}
func (t *toolchainLinuxBionic) ToolchainClangLdflags() string {