[llvm-commits] [compiler-rt] r102032 - in /compiler-rt/trunk/make: AppleBI.mk platform/darwin_bni.mk
Nick Kledzik
kledzik at apple.com
Wed Apr 21 15:46:53 PDT 2010
Author: kledzik
Date: Wed Apr 21 17:46:53 2010
New Revision: 102032
URL: http://llvm.org/viewvc/llvm-project?rev=102032&view=rev
Log:
improve arm build support on darwin
Modified:
compiler-rt/trunk/make/AppleBI.mk
compiler-rt/trunk/make/platform/darwin_bni.mk
Modified: compiler-rt/trunk/make/AppleBI.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/AppleBI.mk?rev=102032&r1=102031&r2=102032&view=diff
==============================================================================
--- compiler-rt/trunk/make/AppleBI.mk (original)
+++ compiler-rt/trunk/make/AppleBI.mk Wed Apr 21 17:46:53 2010
@@ -12,6 +12,13 @@
ProjObjRoot := $(ProjSrcRoot)
endif
+ifeq (,$(SDKROOT))
+ INSTALL_TARGET = install-MacOSX
+else
+ INSTALL_TARGET = install-iPhoneOS
+endif
+
+
# Log full compile lines in B&I logs and omit summary lines.
Verb :=
Summary := @true
@@ -27,8 +34,10 @@
cp -r . $(SRCROOT)
+install: $(INSTALL_TARGET)
+
# Copy results to DSTROOT.
-install: $(SYMROOT)/libcompiler_rt.dylib
+install-MacOSX : $(SYMROOT)/libcompiler_rt.dylib
mkdir -p $(DSTROOT)/usr/lib/system
strip -S $(SYMROOT)/libcompiler_rt.dylib \
-o $(DSTROOT)/usr/lib/system/libcompiler_rt.dylib
@@ -47,6 +56,29 @@
# Rule to make fat dylib
$(SYMROOT)/libcompiler_rt.dylib: $(foreach arch,$(RC_ARCHS), \
- $(OBJROOT)/libcompiler_rt-$(arch).dylib)
+ $(OBJROOT)/libcompiler_rt-$(arch).dylib)
+ lipo -create $^ -o $@
+
+
+
+
+# Copy results to DSTROOT.
+install-iPhoneOS: $(SYMROOT)/libcompiler_rt.a $(SYMROOT)/libcompiler_rt-static.a
+ mkdir -p $(DSTROOT)/$(SDKROOT)/usr/local/lib/libgcc
+ cp $(SYMROOT)/libcompiler_rt.a \
+ $(DSTROOT)/$(SDKROOT)/usr/local/lib/libgcc/libcompiler_rt.a
+ mkdir -p $(DSTROOT)/$(SDKROOT)/usr/local/
+ cp $(SYMROOT)/libcompiler_rt-static.a \
+ $(DSTROOT)/$(SDKROOT)/usr/local/lib/libcompiler_rt-static.a
+
+
+# Rule to make fat archive
+$(SYMROOT)/libcompiler_rt.a : $(foreach arch,$(RC_ARCHS), \
+ $(OBJROOT)/darwin_bni/Release/$(arch)/libcompiler_rt.a)
+ lipo -create $^ -o $@
+
+# Rule to make fat archive
+$(SYMROOT)/libcompiler_rt-static.a : $(foreach arch,$(RC_ARCHS), \
+ $(OBJROOT)/darwin_bni/Static/$(arch)/libcompiler_rt.a)
lipo -create $^ -o $@
Modified: compiler-rt/trunk/make/platform/darwin_bni.mk
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/make/platform/darwin_bni.mk?rev=102032&r1=102031&r2=102032&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/darwin_bni.mk (original)
+++ compiler-rt/trunk/make/platform/darwin_bni.mk Wed Apr 21 17:46:53 2010
@@ -1,7 +1,7 @@
Description := Target for Darwin using an Apple-style build.
-Configs := Debug Release Profile
+Configs := Debug Release Profile Static
# We override this with RC_ARCHS because B&I may want to build on an ARCH we
# haven't explicitly defined support for. If all goes well, this will just work
@@ -10,6 +10,10 @@
CFLAGS := -Wall -Os -fomit-frame-pointer -g
+CFLAGS.Static := $(CFLAGS) -static
+
+VISIBILITY_HIDDEN := 0
+VISIBILITY_HIDDEN.Static := 1
FUNCTIONS := absvdi2 absvsi2 addvdi3 addvsi3 ashldi3 ashrdi3 \
@@ -53,8 +57,18 @@
nedf2vfp negdf2vfp negsf2vfp nesf2vfp \
subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \
modsi3 umodsi3 udivsi3 divsi3 \
- switch8 switchu8 switch16 switch32 \
- restore_vfp_d8_d15_regs save_vfp_d8_d15_regs \
- sync_synchronize
+ switch8 switchu8 switch16 switch32 \
+ restore_vfp_d8_d15_regs save_vfp_d8_d15_regs \
+ sync_synchronize
+FUNCTIONS.armv7 := $(FUNCTIONS) \
+ adddf3vfp addsf3vfp bswapdi2 bswapsi2 divdf3vfp \
+ divsf3vfp eqdf2vfp eqsf2vfp extendsfdf2vfp \
+ fixdfsivfp fixsfsivfp fixunsdfsivfp fixunssfsivfp \
+ floatsidfvfp floatsisfvfp floatunssidfvfp floatunssisfvfp \
+ gedf2vfp gesf2vfp gtdf2vfp gtsf2vfp \
+ ledf2vfp lesf2vfp ltdf2vfp ltsf2vfp \
+ muldf3vfp mulsf3vfp \
+ nedf2vfp negdf2vfp negsf2vfp nesf2vfp \
+ subdf3vfp subsf3vfp truncdfsf2vfp unorddf2vfp unordsf2vfp \
+ modsi3 umodsi3 udivsi3 divsi3
-VISIBILITY_HIDDEN := 0
More information about the llvm-commits
mailing list