summaryrefslogtreecommitdiffstats
path: root/utils/buildit/build_llvm
diff options
context:
space:
mode:
Diffstat (limited to 'utils/buildit/build_llvm')
-rwxr-xr-xutils/buildit/build_llvm54
1 files changed, 17 insertions, 37 deletions
diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm
index 0ffbc19..88a26d3 100755
--- a/utils/buildit/build_llvm
+++ b/utils/buildit/build_llvm
@@ -42,21 +42,17 @@ LLVM_ASSERTIONS="$7"
# build.
LLVM_OPTIMIZED="$8"
-# The ninth parameter is a yes/no that indicates whether libLTO.dylib
-# should be installed.
-INSTALL_LIBLTO="$9"
-
# A yes/no parameter that controls whether to cross-build for an ARM host.
-ARM_HOSTED_BUILD="${10}"
+ARM_HOSTED_BUILD="$9"
# A yes/no parameter that controls whether to cross-build for the iOS simulator
-IOS_SIM_BUILD="${11}"
+IOS_SIM_BUILD="${10}"
# The version number of the submission, e.g. 1007.
-LLVM_SUBMIT_VERSION="${12}"
+LLVM_SUBMIT_VERSION="${11}"
# The subversion number of the submission, e.g. 03.
-LLVM_SUBMIT_SUBVERSION="${13}"
+LLVM_SUBMIT_SUBVERSION="${12}"
# The current working directory is where the build will happen. It may already
# contain a partial result of an interrupted build, in which case this script
@@ -117,7 +113,15 @@ elif [ "$IOS_SIM_BUILD" = yes ]; then
configure_opts="--enable-targets=x86 --host=i686-apple-darwin_sim \
--build=i686-apple-darwin10"
else
- configure_opts="--enable-targets=arm,x86,cbe"
+ 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 :; done
+ CPPFLAGS="$CPPFLAGS -arch $host"
fi
if [ \! -f Makefile.config ]; then
@@ -125,6 +129,7 @@ if [ \! -f Makefile.config ]; then
--enable-assertions=$LLVM_ASSERTIONS \
--enable-optimized=$LLVM_OPTIMIZED \
--disable-bindings \
+ CPPFLAGS="$CPPFLAGS" \
|| exit 1
fi
@@ -156,6 +161,7 @@ make $JOBS_FLAG $OPTIMIZE_OPTS UNIVERSAL=1 UNIVERSAL_ARCH="$HOSTS" \
UNIVERSAL_SDK_PATH=$SDKROOT \
NO_RUNTIME_LIBS=1 \
DISABLE_EDIS=1 \
+ REQUIRES_RTTI=1 \
DEBUG_SYMBOLS=1 \
LLVM_SUBMIT_VERSION=$LLVM_SUBMIT_VERSION \
LLVM_SUBMIT_SUBVERSION=$LLVM_SUBMIT_SUBVERSION \
@@ -218,9 +224,6 @@ if [ "x$LLVM_DEBUG" != "x1" ]; then
done
fi
-# Copy over the tblgen utility.
-cp `find $DIR -name tblgen` $DEST_DIR$DEST_ROOT/bin
-
# Remove .dir files
cd $DEST_DIR$DEST_ROOT
rm -f bin/.dir etc/llvm/.dir lib/.dir
@@ -289,34 +292,11 @@ find obj-* -name \*.\[chy\] -o -name \*.cpp -print \
| cpio -pdml $SYM_DIR/src || exit 1
################################################################################
-# Install and strip libLTO.dylib
+# Remove libLTO.dylib and lto.h. Those are installed by clang.
cd $DEST_DIR$DEST_ROOT
-if [ "$INSTALL_LIBLTO" = "yes" ]; then
- DT_HOME="$DEST_DIR/Developer/usr"
- mkdir -p $DT_HOME/lib
- mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib
-
- # Save a copy of the unstripped dylib
- mkdir -p $SYM_DIR/Developer/usr/lib
- cp $DT_HOME/lib/libLTO.dylib $SYM_DIR/Developer/usr/lib/libLTO.dylib
-
- # Use '-l' to strip i386 modules. N.B. that flag doesn't work with kext or
- # PPC objects!
- $STRIP -arch all -Sl $DT_HOME/lib/libLTO.dylib
-
- if [ "x$DISABLE_USR_LINKS" == "x" ]; then
- # Add a symlink in /usr/lib for B&I.
- mkdir -p $DEST_DIR/usr/lib/
- (cd $DEST_DIR/usr/lib && \
- ln -s ../../Developer/usr/lib/libLTO.dylib ./libLTO.dylib)
- fi
-else
- rm -f lib/libLTO.dylib
-fi
+rm -f lib/libLTO.dylib
rm -f lib/libLTO.a lib/libLTO.la
-
-# Omit lto.h from the result. Clang will supply.
find $DEST_DIR$DEST_ROOT -name lto.h -delete
################################################################################
OpenPOWER on IntegriCloud