diff options
author | Stephen Hines <srhines@google.com> | 2014-04-23 16:57:46 -0700 |
---|---|---|
committer | Stephen Hines <srhines@google.com> | 2014-04-24 15:53:16 -0700 |
commit | 36b56886974eae4f9c5ebc96befd3e7bfe5de338 (patch) | |
tree | e6cfb69fbbd937f450eeb83bfb83b9da3b01275a /utils/buildit | |
parent | 69a8640022b04415ae9fac62f8ab090601d8f889 (diff) | |
download | external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.zip external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.gz external_llvm-36b56886974eae4f9c5ebc96befd3e7bfe5de338.tar.bz2 |
Update to LLVM 3.5a.
Change-Id: Ifadecab779f128e62e430c2b4f6ddd84953ed617
Diffstat (limited to 'utils/buildit')
-rwxr-xr-x | utils/buildit/build_llvm | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index 9e93216..bc609e9 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 @@ -149,7 +151,7 @@ if [ "$ARM_HOSTED_BUILD" = yes ]; then unset SDKROOT && \ $SRC_DIR/configure $COMMON_CONFIGURE_OPTS \ - --enable-targets=arm \ + --enable-targets=arm,arm64 \ --host=arm-apple-darwin10 \ --target=arm-apple-darwin10 \ --build=i686-apple-darwin10 \ @@ -171,10 +173,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,15 +185,18 @@ else DEPLOYMENT_TARGET=-mios-simulator-version-min=$IPHONEOS_DEPLOYMENT_TARGET" fi else - configure_opts="--enable-targets=arm,x86" + export CC=`xcrun -sdk macosx -find clang` + export CXX=`xcrun -sdk macosx -find clang++` + + configure_opts="--enable-targets=arm,arm64,x86" if [ -n "$MACOSX_DEPLOYMENT_TARGET" ]; then COMMON_MAKEFLAGS="$COMMON_MAKEFLAGS \ DEPLOYMENT_TARGET=-mmacosx-version-min=$MACOSX_DEPLOYMENT_TARGET" 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" |