From 38394b962f3f0680aeaa8f3cb9112a340e7b2be8 Mon Sep 17 00:00:00 2001 From: Dan Willemsen Date: Mon, 18 Sep 2017 22:50:22 -0700 Subject: [PATCH] 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 --- cc/config/x86_linux_bionic_host.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/cc/config/x86_linux_bionic_host.go b/cc/config/x86_linux_bionic_host.go index bd6cd0e58..093876d5e 100644 --- a/cc/config/x86_linux_bionic_host.go +++ b/cc/config/x86_linux_bionic_host.go @@ -54,10 +54,6 @@ var ( // 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) ClangLdflags() string { } 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 {