When building llvmCore, pass the SDKROOT and -arch setting to configure.
authorBob Wilson <bob.wilson@apple.com>
Tue, 3 Apr 2012 21:50:26 +0000 (21:50 +0000)
committerBob Wilson <bob.wilson@apple.com>
Tue, 3 Apr 2012 21:50:26 +0000 (21:50 +0000)
So far all of configure tests have been run against the default SDK and
architecture, regardless of what is actually being built.  We've gotten
lucky until now.  <rdar://problem/11112479>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153972 91177308-0d34-0410-b5e6-96231b3b80d8

utils/buildit/build_llvm

index 5c4909c6f340d346eca223451e04c8f3190ea11f..41ac6678e0a73521d037c909f9c2578f28ad06ba 100755 (executable)
@@ -120,11 +120,21 @@ else
   configure_opts="--enable-targets=arm,x86"
 fi
 
+if [ "$ARM_HOSTED_BUILD" != yes ]; then
+  if [ $SDKROOT ]; then
+    CPPFLAGS="$CPPFLAGS -isysroot $SDKROOT"
+  fi
+  for host in $HOSTS; do
+    CPPFLAGS="$CPPFLAGS -arch $host"
+  done
+fi
+
 if [ \! -f Makefile.config ]; then
   $SRC_DIR/configure --prefix=$DEST_DIR$DEST_ROOT $configure_opts \
     --enable-assertions=$LLVM_ASSERTIONS \
     --enable-optimized=$LLVM_OPTIMIZED \
     --disable-bindings \
+    CPPFLAGS="$CPPFLAGS" \
     || exit 1
 fi