diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-01-18 21:01:00 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-01-18 21:01:00 +0000 |
commit | b4eae999f6064291ef1069a5d5e219189cc902a4 (patch) | |
tree | a6cc293db8f45f002fd42592a9d3d84897ccac77 /utils | |
parent | 5c5eb80255293ece142b59e170256be0880b6bfb (diff) | |
download | external_llvm-b4eae999f6064291ef1069a5d5e219189cc902a4.zip external_llvm-b4eae999f6064291ef1069a5d5e219189cc902a4.tar.gz external_llvm-b4eae999f6064291ef1069a5d5e219189cc902a4.tar.bz2 |
Fix makefiles to enable Apply style debug build.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46180 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/buildit/GNUmakefile | 9 | ||||
-rwxr-xr-x | utils/buildit/build_llvm | 21 |
2 files changed, 15 insertions, 15 deletions
diff --git a/utils/buildit/GNUmakefile b/utils/buildit/GNUmakefile index a024c1e..400d97a 100644 --- a/utils/buildit/GNUmakefile +++ b/utils/buildit/GNUmakefile @@ -41,6 +41,13 @@ else LLVM_ASSERTIONS := no endif +# Default is optimized build. +ifeq ($(LLVM_DEBUG),1) +LLVM_OPTIMIZED := no +else +LLVM_OPTIMIZED := yes +endif + ifndef RC_ProjectSourceVersion RC_ProjectSourceVersion = 9999 endif @@ -54,7 +61,7 @@ install: $(OBJROOT) $(SYMROOT) $(DSTROOT) $(SRC)/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \ $(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \ $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion) \ - $(LLVM_ASSERTIONS) + $(LLVM_ASSERTIONS) $(LLVM_OPTIMIZED) # installhdrs does nothing, because the headers aren't useful until # the compiler is installed. diff --git a/utils/buildit/build_llvm b/utils/buildit/build_llvm index ecef40f..90a2d96 100755 --- a/utils/buildit/build_llvm +++ b/utils/buildit/build_llvm @@ -44,6 +44,10 @@ LLVM_SUBMIT_SUBVERSION="$8" # enabled in the LLVM libs/tools. LLVM_ASSERTIONS="$9" +# The tenth parameter is a yes/no that indicates whether this is an optimized +# build. +LLVM_OPTIMIZED="${10}" + # 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 # will continue where it left off. @@ -55,19 +59,6 @@ echo DARWIN_VERS = $DARWIN_VERS # If the user has CC set in their environment unset it now unset CC -# The B&I build srcript (~rc/bin/buildit) accepts an '-othercflags' command-line -# flag, and captures the argument to that flag in $RC_NONARCH_CFLAGS (and -# mysteriously prepends '-pipe' thereto). We will allow this to override the -# default $CFLAGS and $CXXFLAGS. - -if [ "x$LLVM_DEBUG" == "x" ]; then - CFLAGS="-g -O2 ${RC_NONARCH_CFLAGS/-pipe/}" - OPTIMIZE_OPTS="ENABLE_OPTIMIZED=1" -else - CFLAGS="-g" - OPTIMIZE_OPTS= -fi - ################################################################################ # Run the build. @@ -85,7 +76,9 @@ cd $DIR/obj-llvm || exit 1 if [ \! -f Makefile.config ]; then $SRC_DIR/llvm/configure --prefix=$DEST_DIR$DEST_ROOT \ - --enable-targets=x86,powerpc,cbe --enable-assertions=$LLVM_ASSERTIONS \ + --enable-targets=x86,powerpc,cbe \ + --enable-assertions=$LLVM_ASSERTIONS \ + --enable-optimized=$LLVM_OPTIMIZED \ || exit 1 fi |