forked from OSchip/llvm-project
<rdar://problem/9282305> install an archive for dyld and fix missing -static
llvm-svn: 129492
This commit is contained in:
parent
c5ca87675e
commit
19b826011e
|
@ -19,8 +19,8 @@ else
|
|||
INSTALL_TARGET = install-iOS
|
||||
CFLAGS.Release.armv6 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT)
|
||||
CFLAGS.Release.armv7 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT)
|
||||
CFLAGS.Static.armv6 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT)
|
||||
CFLAGS.Static.armv7 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT)
|
||||
CFLAGS.Static.armv6 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT) -static
|
||||
CFLAGS.Static.armv7 := $(CFLAGS) -Wall -Os -fomit-frame-pointer -g -isysroot $(SDKROOT) -static
|
||||
LD_OTHER_FLAGS = -Wl,-alias_list,$(SRCROOT)/lib/arm/softfloat-alias.list -isysroot $(SDKROOT)
|
||||
endif
|
||||
|
||||
|
@ -43,7 +43,11 @@ installsrc:
|
|||
install: $(INSTALL_TARGET)
|
||||
|
||||
# Copy results to DSTROOT.
|
||||
install-MacOSX : $(SYMROOT)/libcompiler_rt.dylib
|
||||
install-MacOSX : $(SYMROOT)/libcompiler_rt.dylib \
|
||||
$(SYMROOT)/libcompiler_rt-dyld.a
|
||||
mkdir -p $(DSTROOT)/usr/local/lib/dyld
|
||||
cp $(SYMROOT)/libcompiler_rt-dyld.a \
|
||||
$(DSTROOT)/usr/local/lib/dyld/libcompiler_rt.a
|
||||
mkdir -p $(DSTROOT)/usr/lib/system
|
||||
strip -S $(SYMROOT)/libcompiler_rt.dylib \
|
||||
-o $(DSTROOT)/usr/lib/system/libcompiler_rt.dylib
|
||||
|
@ -70,10 +74,14 @@ $(SYMROOT)/libcompiler_rt.dylib: $(foreach arch,$(RC_ARCHS), \
|
|||
|
||||
# Copy results to DSTROOT.
|
||||
install-iOS: $(SYMROOT)/libcompiler_rt-static.a \
|
||||
$(SYMROOT)/libcompiler_rt-dyld.a \
|
||||
$(SYMROOT)/libcompiler_rt.dylib
|
||||
mkdir -p $(DSTROOT)/usr/local/lib
|
||||
cp $(SYMROOT)/libcompiler_rt-static.a \
|
||||
$(DSTROOT)/usr/local/lib/libcompiler_rt-static.a
|
||||
mkdir -p $(DSTROOT)/usr/local/lib/dyld
|
||||
cp $(SYMROOT)/libcompiler_rt-dyld.a \
|
||||
$(DSTROOT)/usr/local/lib/dyld/libcompiler_rt.a
|
||||
mkdir -p $(DSTROOT)/usr/lib/system
|
||||
strip -S $(SYMROOT)/libcompiler_rt.dylib \
|
||||
-o $(DSTROOT)/usr/lib/system/libcompiler_rt.dylib
|
||||
|
@ -84,3 +92,16 @@ $(SYMROOT)/libcompiler_rt-static.a : $(foreach arch,$(RC_ARCHS), \
|
|||
$(OBJROOT)/darwin_bni/Static/$(arch)/libcompiler_rt.a)
|
||||
lipo -create $^ -o $@
|
||||
|
||||
# rule to make each archive slice for dyld
|
||||
$(OBJROOT)/libcompiler_rt-dyld-%.a : $(OBJROOT)/darwin_bni/Release/%/libcompiler_rt.a
|
||||
cp $^ $@
|
||||
ar -d $@ apple_versioning.o
|
||||
ar -d $@ gcc_personality_v0.o
|
||||
ar -d $@ eprintf.o
|
||||
ranlib $@
|
||||
|
||||
# rule to make make archive for dyld
|
||||
$(SYMROOT)/libcompiler_rt-dyld.a : $(foreach arch,$(RC_ARCHS), \
|
||||
$(OBJROOT)/libcompiler_rt-dyld-$(arch).a)
|
||||
lipo -create $^ -o $@
|
||||
|
||||
|
|
Loading…
Reference in New Issue