[llvm-commits] [llvm] r102531 - in /llvm/trunk/utils/buildit: GNUmakefile build_llvm
Bob Wilson
bob.wilson at apple.com
Wed Apr 28 14:08:01 PDT 2010
Author: bwilson
Date: Wed Apr 28 16:08:01 2010
New Revision: 102531
URL: http://llvm.org/viewvc/llvm-project?rev=102531&view=rev
Log:
Add an option to the Apple-style build to control whether libLTO.dylib should
be installed. Disable it by default.
Modified:
llvm/trunk/utils/buildit/GNUmakefile
llvm/trunk/utils/buildit/build_llvm
Modified: llvm/trunk/utils/buildit/GNUmakefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/GNUmakefile?rev=102531&r1=102530&r2=102531&view=diff
==============================================================================
--- llvm/trunk/utils/buildit/GNUmakefile (original)
+++ llvm/trunk/utils/buildit/GNUmakefile Wed Apr 28 16:08:01 2010
@@ -46,6 +46,9 @@
LLVM_OPTIMIZED := yes
endif
+# Default to not install libLTO.dylib.
+INSTALL_LIBLTO := no
+
ifndef RC_ProjectSourceVersion
RC_ProjectSourceVersion = 9999
endif
@@ -59,7 +62,7 @@
cd $(OBJROOT) && \
$(SRC)/utils/buildit/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
$(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
- $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) \
+ $(ENABLE_ASSERTIONS) $(LLVM_OPTIMIZED) $(INSTALL_LIBLTO) \
$(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion)
# installhdrs does nothing, because the headers aren't useful until
Modified: llvm/trunk/utils/buildit/build_llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/buildit/build_llvm?rev=102531&r1=102530&r2=102531&view=diff
==============================================================================
--- llvm/trunk/utils/buildit/build_llvm (original)
+++ llvm/trunk/utils/buildit/build_llvm Wed Apr 28 16:08:01 2010
@@ -42,11 +42,15 @@
# build.
LLVM_OPTIMIZED="$8"
-# The nineth parameter is the version number of the submission, e.g. 1007.
-LLVM_SUBMIT_VERSION="$9"
+# The ninth parameter is a yes/no that indicates whether libLTO.dylib
+# should be installed.
+INSTALL_LIBLTO="$9"
-# The tenth parameter is the subversion number of the submission, e.g. 03.
-LLVM_SUBMIT_SUBVERSION="${10}"
+# The tenth parameter is the version number of the submission, e.g. 1007.
+LLVM_SUBMIT_VERSION="${10}"
+
+# The eleventh parameter is the subversion number of the submission, e.g. 03.
+LLVM_SUBMIT_SUBVERSION="${11}"
# 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
@@ -276,9 +280,13 @@
fi
cd $DEST_DIR$DEST_ROOT
-mkdir -p $DT_HOME/lib
-mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib
-strip -S $DT_HOME/lib/libLTO.dylib
+if [ "$INSTALL_LIBLTO" == yes ]; then
+ mkdir -p $DT_HOME/lib
+ mv lib/libLTO.dylib $DT_HOME/lib/libLTO.dylib
+ strip -S $DT_HOME/lib/libLTO.dylib
+else
+ rm lib/libLTO.dylib
+fi
rm -f lib/libLTO.a lib/libLTO.la
# The Hello dylib is an example of how to build a pass. No need to install it.
@@ -343,10 +351,11 @@
################################################################################
# symlinks so that B&I can find things
-cd $DEST_DIR
-mkdir -p ./usr/lib/
-cd usr/lib
-ln -s ../../$DEVELOPER_DIR/usr/lib/libLTO.dylib ./libLTO.dylib
+if [ "$INSTALL_LIBLTO" == yes ]; then
+ mkdir -p $DEST_DIR/usr/lib/
+ cd $DEST_DIR/usr/lib && \
+ ln -s ../../$DEVELOPER_DIR/usr/lib/libLTO.dylib ./libLTO.dylib
+fi
################################################################################
# w00t! Done!
More information about the llvm-commits
mailing list