summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-02-18 11:20:44 +0000
committerTim Northover <tnorthover@apple.com>2014-02-18 11:20:44 +0000
commiteb720cc3a118f4bc397981f4487cd5894072f9aa (patch)
tree40452248d69aa56aec7be04edeee21d62a66aa18 /utils
parent4bcb9852959dd9373ea9591df9aaffb5a6c9e08e (diff)
downloadllvm-eb720cc3a118f4bc397981f4487cd5894072f9aa.tar.gz
llvm-eb720cc3a118f4bc397981f4487cd5894072f9aa.tar.bz2
llvm-eb720cc3a118f4bc397981f4487cd5894072f9aa.tar.xz
Darwin builds: handle different possible form for SDKROOT.
Modifying build_llvm to handle SDKROOT being the name of an SDK rather than a path. This will still work if SDKROOT is a path. rdar://problem/15162322 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rwxr-xr-xutils/buildit/build_llvm10
1 files changed, 6 insertions, 4 deletions
diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm
index d63d7e88cd..6d0a85ea8d 100755
--- a/utils/buildit/build_llvm
+++ b/utils/buildit/build_llvm
@@ -89,6 +89,8 @@ else
LLVM_VERSION="$LLVM_SUBMIT_VERSION-$LLVM_SUBMIT_SUBVERSION"
fi
+SDKROOT_PATH=`xcodebuild -version -sdk $SDKROOT Path`
+
# Figure out how many make processes to run.
SYSCTL=`sysctl -n hw.activecpu`
# sysctl -n hw.* does not work when invoked via B&I chroot /BuildRoot.
@@ -109,7 +111,7 @@ COMMON_CONFIGURE_OPTS="\
COMMON_MAKEFLAGS="\
UNIVERSAL=1 \
- UNIVERSAL_SDK_PATH=$SDKROOT \
+ UNIVERSAL_SDK_PATH=$SDKROOT_PATH \
NO_RUNTIME_LIBS=1 \
DISABLE_EDIS=1 \
REQUIRES_RTTI=1 \
@@ -141,7 +143,7 @@ if [ "$ARM_HOSTED_BUILD" = yes ]; then
T=`xcrun -sdk $SDKROOT -find ${prog}`
ln -s $T $DIR/bin/$prog
echo '#!/bin/sh' > $P || exit 1
- echo 'exec '$T' -arch armv7 -isysroot '${SDKROOT}' "$@"' >> $P || exit 1
+ echo 'exec '$T' -arch armv7 -isysroot '${SDKROOT_PATH}' "$@"' >> $P || exit 1
chmod a+x $P || exit 1
done
@@ -193,8 +195,8 @@ else
fi
fi
- if [ $SDKROOT ]; then
- CPPFLAGS="$CPPFLAGS -isysroot $SDKROOT"
+ if [ $SDKROOT_PATH ]; then
+ CPPFLAGS="$CPPFLAGS -isysroot $SDKROOT_PATH"
fi
for host in $HOSTS; do :; done
CPPFLAGS="$CPPFLAGS -arch $host"