summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2014-01-28 19:57:18 +0000
committerOwen Anderson <resistor@mac.com>2014-01-28 19:57:18 +0000
commit6cccb32fb09035854a77b01224d512eefe7de45d (patch)
treeea1a3a9e72fddfd758c9f1b3afdebef86ed54675
parent79877dc1502d7da819f381dd8bc2d7e0d0ab0c2d (diff)
downloadllvm-6cccb32fb09035854a77b01224d512eefe7de45d.tar.gz
llvm-6cccb32fb09035854a77b01224d512eefe7de45d.tar.bz2
llvm-6cccb32fb09035854a77b01224d512eefe7de45d.tar.xz
Use the proper SDK when building iOS sim builds of LLVM and/or Mac OS X builds.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200335 91177308-0d34-0410-b5e6-96231b3b80d8
-rwxr-xr-xutils/buildit/build_llvm9
1 files changed, 6 insertions, 3 deletions
diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm
index 9e9321601c..d63d7e88cd 100755
--- a/utils/buildit/build_llvm
+++ b/utils/buildit/build_llvm
@@ -171,10 +171,10 @@ if [ "$ARM_HOSTED_BUILD" = yes ]; then
else
# not $ARM_HOSTED_BUILD
- export CC=`xcrun -find clang`
- export CXX=`xcrun -find clang++`
-
if [ "$IOS_SIM_BUILD" = yes ]; then
+ export CC=`xcrun -sdk iphonesimulator -find clang`
+ export CXX=`xcrun -sdk iphonesimulator -find clang++`
+
# Use a non-standard "darwin_sim" host triple to trigger a cross-build.
configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \
--build=i686-apple-darwin10"
@@ -183,6 +183,9 @@ else
DEPLOYMENT_TARGET=-mios-simulator-version-min=$IPHONEOS_DEPLOYMENT_TARGET"
fi
else
+ export CC=`xcrun -sdk macosx -find clang`
+ export CXX=`xcrun -sdk macosx -find clang++`
+
configure_opts="--enable-targets=arm,x86"
if [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then
COMMON_MAKEFLAGS="$COMMON_MAKEFLAGS \