Release Notes: RegisterScheduler::setDefault removed; by Mehdi Amini
[oota-llvm.git] / utils / buildit / build_llvm
index d63d7e88cd23598440a8228c53b9f065efc40d1f..bc609e909a92b20e8bb1d6f041fbe033e9a2af9d 100755 (executable)
@@ -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 \
@@ -186,15 +188,15 @@ else
     export CC=`xcrun -sdk macosx -find clang`
     export CXX=`xcrun -sdk macosx -find clang++`
 
-    configure_opts="--enable-targets=arm,x86"
+    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"