support another Apple build environment
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@131996 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1122fec973
commit
8feadca3fa
26
Makefile
26
Makefile
@ -9,6 +9,12 @@ OBJROOT=.
|
|||||||
SYMROOT=.
|
SYMROOT=.
|
||||||
export TRIPLE=-apple-
|
export TRIPLE=-apple-
|
||||||
|
|
||||||
|
ifeq (,$(RC_INDIGO))
|
||||||
|
INSTALL_PREFIX=""
|
||||||
|
else
|
||||||
|
INSTALL_PREFIX="$(SDKROOT)"
|
||||||
|
endif
|
||||||
|
|
||||||
installsrc:: $(SRCROOT)
|
installsrc:: $(SRCROOT)
|
||||||
|
|
||||||
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
ditto $(SRCDIRS)/include $(SRCROOT)/include
|
||||||
@ -20,19 +26,19 @@ clean::
|
|||||||
|
|
||||||
installhdrs::
|
installhdrs::
|
||||||
|
|
||||||
mkdir -p $(DSTROOT)/usr/include/c++/v1/ext
|
mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/usr/include/c++/v1/ext
|
||||||
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/usr/include/c++/v1/
|
rsync -r --exclude=".*" $(SRCDIRS)/include/* $(DSTROOT)/$(INSTALL_PREFIX)/usr/include/c++/v1/
|
||||||
chown -R root:wheel $(DSTROOT)/usr/include
|
chown -R root:wheel $(DSTROOT)/$(INSTALL_PREFIX)/usr/include
|
||||||
chmod 755 $(DSTROOT)/usr/include/c++/v1
|
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/usr/include/c++/v1
|
||||||
chmod 644 $(DSTROOT)/usr/include/c++/v1/*
|
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/usr/include/c++/v1/*
|
||||||
chmod 755 $(DSTROOT)/usr/include/c++/v1/ext
|
chmod 755 $(DSTROOT)/$(INSTALL_PREFIX)/usr/include/c++/v1/ext
|
||||||
chmod 644 $(DSTROOT)/usr/include/c++/v1/ext/*
|
chmod 644 $(DSTROOT)/$(INSTALL_PREFIX)/usr/include/c++/v1/ext/*
|
||||||
|
|
||||||
install:: installhdrs $(DESTDIR)
|
install:: installhdrs $(DESTDIR)
|
||||||
|
|
||||||
cd lib && ./buildit
|
cd lib && ./buildit
|
||||||
ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
|
ditto lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
|
||||||
cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM $(SYMROOT)/usr/lib/libc++.1.dylib
|
cd lib && dsymutil -o $(SYMROOT)/libc++.1.dylib.dSYM $(SYMROOT)/usr/lib/libc++.1.dylib
|
||||||
mkdir -p $(DSTROOT)/usr/lib
|
mkdir -p $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib
|
||||||
strip -S -o $(DSTROOT)/usr/lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
|
strip -S -o $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib/libc++.1.dylib $(SYMROOT)/usr/lib/libc++.1.dylib
|
||||||
cd $(DSTROOT)/usr/lib && ln -s libc++.1.dylib libc++.dylib
|
cd $(DSTROOT)/$(INSTALL_PREFIX)/usr/lib && ln -s libc++.1.dylib libc++.dylib
|
||||||
|
10
lib/buildit
10
lib/buildit
@ -24,7 +24,10 @@ fi
|
|||||||
|
|
||||||
if [ -z $MACOSX_DEPLOYMENT_TARGET ]
|
if [ -z $MACOSX_DEPLOYMENT_TARGET ]
|
||||||
then
|
then
|
||||||
MACOSX_DEPLOYMENT_TARGET=10.6
|
if [ -z $IPHONEOS_DEPLOYMENT_TARGET ]
|
||||||
|
then
|
||||||
|
MACOSX_DEPLOYMENT_TARGET=10.6
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $RC_ProjectSourceVersion ]
|
if [ -z $RC_ProjectSourceVersion ]
|
||||||
@ -55,7 +58,10 @@ case $TRIPLE in
|
|||||||
if [ -n "$SDKROOT" ]
|
if [ -n "$SDKROOT" ]
|
||||||
then
|
then
|
||||||
EXTRA_FLAGS+="-isysroot ${SDKROOT}"
|
EXTRA_FLAGS+="-isysroot ${SDKROOT}"
|
||||||
RE_EXPORT_FILE="libc++sjlj-abi.exp"
|
if [ "${RC_armv7}" = "YES" ]
|
||||||
|
then
|
||||||
|
RE_EXPORT_FILE="libc++sjlj-abi.exp"
|
||||||
|
fi
|
||||||
CXX=`xcrun -sdk "${SDKROOT}" -find clang++`
|
CXX=`xcrun -sdk "${SDKROOT}" -find clang++`
|
||||||
CC=`xcrun -sdk "${SDKROOT}" -find clang`
|
CC=`xcrun -sdk "${SDKROOT}" -find clang`
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user