[llvm-commits] [compiler-rt] r100045 - in /compiler-rt/trunk/make: AppleBI.mk platform/darwin_bni.mk
Nick Kledzik
kledzik at apple.com
Wed Mar 31 13:38:57 PDT 2010
Author: kledzik
Date: Wed Mar 31 15:38:57 2010
New Revision: 100045
URL: http://llvm.org/viewvc/llvm-project?rev=100045&view=rev
Log:
<rdar://problem/7733536> Move libcompiler_rt over to a dylib target for Libsystem
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=100045&r1=100044&r2=100045&view=diff
==============================================================================
--- compiler-rt/trunk/make/AppleBI.mk (original)
+++ compiler-rt/trunk/make/AppleBI.mk Wed Mar 31 15:38:57 2010
@@ -28,27 +28,25 @@
# Copy results to DSTROOT.
-install: $(SYMROOT)/usr/local/lib/system/libcompiler_rt.a
- mkdir -p $(DSTROOT)/usr/local/lib/system
- cp $(SYMROOT)/usr/local/lib/system/libcompiler_rt.a \
- $(DSTROOT)/usr/local/lib/system/libcompiler_rt.a
- cd $(DSTROOT)/usr/local/lib/system; \
- ln -s libcompiler_rt.a libcompiler_rt_profile.a; \
- ln -s libcompiler_rt.a libcompiler_rt_debug.a
-
-
-# Rule to make fat libcompiler_rt.a.
-$(SYMROOT)/usr/local/lib/system/libcompiler_rt.a : $(foreach arch,$(RC_ARCHS), \
- $(OBJROOT)/$(arch)-pruned.a)
- mkdir -p $(SYMROOT)/usr/local/lib/system
+install: $(SYMROOT)/libcompiler_rt.dylib
+ mkdir -p $(DSTROOT)/usr/lib/system
+ strip -S $(SYMROOT)/libcompiler_rt.dylib \
+ -o $(DSTROOT)/usr/lib/system/libcompiler_rt.dylib
+ cd $(DSTROOT)/usr/lib/system; \
+ ln -s libcompiler_rt.dylib libcompiler_rt_profile.dylib; \
+ ln -s libcompiler_rt.dylib libcompiler_rt_debug.dylib
+
+# Rule to make each dylib slice
+$(OBJROOT)/libcompiler_rt-%.dylib : $(OBJROOT)/darwin_bni/Release/%/libcompiler_rt.a
+ echo "const char vers[] = \"@(#) $(RC_ProjectName)-$(RC_ProjectSourceVersion)\"; " > $(OBJROOT)/version.c
+ cc $(OBJROOT)/version.c -arch $* -dynamiclib \
+ -install_name /usr/lib/system/libcompiler_rt.dylib \
+ -compatibility_version 1 -current_version $(RC_ProjectSourceVersion) \
+ -nodefaultlibs -lSystem -umbrella System -dead_strip \
+ -Wl,-force_load,$^ -o $@
+
+# Rule to make fat dylib
+$(SYMROOT)/libcompiler_rt.dylib: $(foreach arch,$(RC_ARCHS), \
+ $(OBJROOT)/libcompiler_rt-$(arch).dylib)
lipo -create $^ -o $@
-
-# Rule to add project info so that "what /usr/lib/libSystem.B.dylib" will work.
-$(OBJROOT)/%-pruned.a : $(OBJROOT)/darwin_bni/Release/%/libcompiler_rt.a
- mkdir -p $(OBJROOT)/$*.tmp
- cd $(OBJROOT)/$*.tmp; \
- /Developer/Makefiles/bin/version.pl $(RC_ProjectName) > $(OBJROOT)/version.c; \
- gcc -arch $* -c ${OBJROOT}/version.c -o version.o; \
- ar -x $<; \
- libtool -static *.o -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=100045&r1=100044&r2=100045&view=diff
==============================================================================
--- compiler-rt/trunk/make/platform/darwin_bni.mk (original)
+++ compiler-rt/trunk/make/platform/darwin_bni.mk Wed Mar 31 15:38:57 2010
@@ -9,7 +9,7 @@
UniversalArchs := $(RC_ARCHS)
-CFLAGS := -Wall -O3 -fomit-frame-pointer
+CFLAGS := -Wall -Os -fomit-frame-pointer -g
FUNCTIONS := absvdi2 absvsi2 addvdi3 addvsi3 ashldi3 ashrdi3 \
More information about the llvm-commits
mailing list