summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2011-12-08 02:39:54 +0000
committerDaniel Dunbar <daniel@zuster.org>2011-12-08 02:39:54 +0000
commit4fd6b1c8d9ffba56fb5151a7beae487160e0903d (patch)
tree5b151deb740c0fd40e71b3a2aa7a668c2f15d9e1 /make
parent86f9994936336675dcc1454ede5857e8851080b6 (diff)
downloadcompiler-rt-4fd6b1c8d9ffba56fb5151a7beae487160e0903d.tar.gz
compiler-rt-4fd6b1c8d9ffba56fb5151a7beae487160e0903d.tar.bz2
compiler-rt-4fd6b1c8d9ffba56fb5151a7beae487160e0903d.tar.xz
platform/clang_linux: Switch builtin and profile libraries to build using the
stub SDK. - This allows us to build both the m32 and m64 variants without worrying about whether or not the user has the headers for the alternate arch installed. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@146132 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'make')
-rw-r--r--make/platform/clang_linux.mk22
1 files changed, 12 insertions, 10 deletions
diff --git a/make/platform/clang_linux.mk b/make/platform/clang_linux.mk
index 92763a5c..b3a77593 100644
--- a/make/platform/clang_linux.mk
+++ b/make/platform/clang_linux.mk
@@ -24,22 +24,16 @@ CompilerTargetArch := $(firstword $(subst -, ,$(CompilerTargetTriple)))
ifneq ($(findstring -linux-,$(CompilerTargetTriple)),)
# Configurations which just include all the runtime functions.
-ifeq ($(CompilerTargetArch),i386)
-Configs += full-i386
+ifeq ($(call contains,i386 x86_64,$(CompilerTargetArch)),true)
+Configs += full-i386 full-x86_64
Arch.full-i386 := i386
-endif
-ifeq ($(CompilerTargetArch),x86_64)
-Configs += full-x86_64
Arch.full-x86_64 := x86_64
endif
# Configuration for profile runtime.
-ifeq ($(CompilerTargetArch),i386)
-Configs += profile-i386
+ifeq ($(call contains,i386 x86_64,$(CompilerTargetArch)),true)
+Configs += profile-i386 profile-x86_64
Arch.profile-i386 := i386
-endif
-ifeq ($(CompilerTargetArch),x86_64)
-Configs += profile-x86_64
Arch.profile-x86_64 := x86_64
endif
@@ -66,6 +60,14 @@ CFLAGS.profile-x86_64 := $(CFLAGS) -m64
CFLAGS.asan-i386 := $(CFLAGS) -m32
CFLAGS.asan-x86_64 := $(CFLAGS) -m64
+# Use our stub SDK as the sysroot to support more portable building. For now we
+# just do this for the non-ASAN modules, because the stub SDK doesn't have
+# enough support to build ASAN.
+CFLAGS.full-i386 += --sysroot=$(ProjSrcRoot)/SDKs/linux
+CFLAGS.full-x86_64 += --sysroot=$(ProjSrcRoot)/SDKs/linux
+CFLAGS.profile-i386 += --sysroot=$(ProjSrcRoot)/SDKs/linux
+CFLAGS.profile-x86_64 += --sysroot=$(ProjSrcRoot)/SDKs/linux
+
FUNCTIONS.full-i386 := $(CommonFunctions) $(ArchFunctions.i386)
FUNCTIONS.full-x86_64 := $(CommonFunctions) $(ArchFunctions.x86_64)
FUNCTIONS.profile-i386 := GCDAProfiling