[llvm-commits] [compiler-rt] r152057 - /compiler-rt/trunk/make/platform/clang_darwin.mk

Daniel Dunbar daniel at zuster.org
Mon Mar 5 12:46:06 PST 2012


Author: ddunbar
Date: Mon Mar  5 14:46:06 2012
New Revision: 152057

URL: http://llvm.org/viewvc/llvm-project?rev=152057&view=rev
Log:
make/clang_darwin: Tweak CheckArches function to force the integrated-as and use
the stub SDK to try and ensure we always pick up the right archs when they
should be able to be used.
 - Also, warn when we drop an architecture.

This is a reapplication of r150232 that should stick now that we have the
integrated assembler on for ARM.

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

Modified: compiler-rt/trunk/make/platform/clang_darwin.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/clang_darwin.mk?rev=152057&r1=152056&r2=152057&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/clang_darwin.mk (original)
+++ compiler-rt/trunk/make/platform/clang_darwin.mk Mon Mar  5 14:46:06 2012
@@ -13,9 +13,14 @@
     result=""; \
     for arch in $(1); do \
       if $(CC) -arch $$arch -c \
+	  -integrated-as \
 	  $(ProjSrcRoot)/make/platform/clang_darwin_test_input.c \
+	  -isysroot $(ProjSrcRoot)/SDKs/darwin \
 	  -o /dev/null > /dev/null 2> /dev/null; then \
         result="$$result$$arch "; \
+      else \
+	printf 1>&2 \
+	  "warning: clang_darwin.mk: dropping arch '$$arch' from lib '$(2)'\n"; \
       fi; \
     done; \
     echo $$result)
@@ -31,40 +36,40 @@
 # still be referenced from Darwin system headers. This symbol is only ever
 # needed on i386.
 Configs += eprintf
-UniversalArchs.eprintf := $(call CheckArches,i386)
+UniversalArchs.eprintf := $(call CheckArches,i386,eprintf)
 
 # Configuration for targetting 10.4. We need a few functions missing from
 # libgcc_s.10.4.dylib. We only build x86 slices since clang doesn't really
 # support targetting PowerPC.
 Configs += 10.4
-UniversalArchs.10.4 := $(call CheckArches,i386 x86_64)
+UniversalArchs.10.4 := $(call CheckArches,i386 x86_64,10.4)
 
 # Configuration for targetting iOS, for some ARMv6 functions, which must be
 # in the same linkage unit, and for a couple of other functions that didn't
 # make it into libSystem.
 Configs += ios
-UniversalArchs.ios := $(call CheckArches,i386 x86_64 armv6 armv7)
+UniversalArchs.ios := $(call CheckArches,i386 x86_64 armv6 armv7,ios)
 
 # Configuration for targetting OSX. These functions may not be in libSystem
 # so we should provide our own.
 Configs += osx
-UniversalArchs.osx := $(call CheckArches,i386 x86_64)
+UniversalArchs.osx := $(call CheckArches,i386 x86_64,osx)
 
 # Configuration for use with kernel/kexts.
 Configs += cc_kext
-UniversalArchs.cc_kext := $(call CheckArches,armv6 armv7 i386 x86_64)
+UniversalArchs.cc_kext := $(call CheckArches,armv6 armv7 i386 x86_64,cc_kext)
 
 # Configurations which define the profiling support functions.
 Configs += profile_osx
-UniversalArchs.profile_osx := $(call CheckArches,i386 x86_64)
+UniversalArchs.profile_osx := $(call CheckArches,i386 x86_64,profile_osx)
 Configs += profile_ios
-UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64 armv6 armv7)
+UniversalArchs.profile_ios := $(call CheckArches,i386 x86_64 armv6 armv7,profile_ios)
 
 # Configurations which define the ASAN support functions.
 #
 # Note that ASAN doesn't appear to currently support i386.
 Configs += asan_osx
-UniversalArchs.asan_osx := $(call CheckArches,i386 x86_64)
+UniversalArchs.asan_osx := $(call CheckArches,i386 x86_64,asan_osx)
 
 # If RC_SUPPORTED_ARCHS is defined, treat it as a list of the architectures we
 # are intended to support and limit what we try to build to that.





More information about the llvm-commits mailing list