[llvm-commits] [compiler-rt] r146132 - /compiler-rt/trunk/make/platform/clang_linux.mk

Daniel Dunbar daniel at zuster.org
Wed Dec 7 18:39:55 PST 2011


Author: ddunbar
Date: Wed Dec  7 20:39:54 2011
New Revision: 146132

URL: http://llvm.org/viewvc/llvm-project?rev=146132&view=rev
Log:
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.

Modified:
    compiler-rt/trunk/make/platform/clang_linux.mk

Modified: compiler-rt/trunk/make/platform/clang_linux.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_linux.mk?rev=146132&r1=146131&r2=146132&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/clang_linux.mk (original)
+++ compiler-rt/trunk/make/platform/clang_linux.mk Wed Dec  7 20:39:54 2011
@@ -24,22 +24,16 @@
 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.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





More information about the llvm-commits mailing list