llvm.org GIT mirror llvm / b4eae99
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 Evan Cheng 11 years ago
2 changed file(s) with 15 addition(s) and 15 deletion(s). Raw diff Collapse all Expand all
4040 LLVM_ASSERTIONS := no
4141 endif
4242
43 # Default is optimized build.
44 ifeq ($(LLVM_DEBUG),1)
45 LLVM_OPTIMIZED := no
46 else
47 LLVM_OPTIMIZED := yes
48 endif
49
4350 ifndef RC_ProjectSourceVersion
4451 RC_ProjectSourceVersion = 9999
4552 endif
5360 $(SRC)/build_llvm "$(RC_ARCHS)" "$(TARGETS)" \
5461 $(SRC) $(PREFIX) $(DSTROOT) $(SYMROOT) \
5562 $(RC_ProjectSourceVersion) $(RC_ProjectSourceSubversion) \
56 $(LLVM_ASSERTIONS)
63 $(LLVM_ASSERTIONS) $(LLVM_OPTIMIZED)
5764
5865 # installhdrs does nothing, because the headers aren't useful until
5966 # the compiler is installed.
4343 # enabled in the LLVM libs/tools.
4444 LLVM_ASSERTIONS="$9"
4545
46 # The tenth parameter is a yes/no that indicates whether this is an optimized
47 # build.
48 LLVM_OPTIMIZED="${10}"
49
4650 # The current working directory is where the build will happen. It may already
4751 # contain a partial result of an interrupted build, in which case this script
4852 # will continue where it left off.
5357
5458 # If the user has CC set in their environment unset it now
5559 unset CC
56
57 # The B&I build srcript (~rc/bin/buildit) accepts an '-othercflags' command-line
58 # flag, and captures the argument to that flag in $RC_NONARCH_CFLAGS (and
59 # mysteriously prepends '-pipe' thereto). We will allow this to override the
60 # default $CFLAGS and $CXXFLAGS.
61
62 if [ "x$LLVM_DEBUG" == "x" ]; then
63 CFLAGS="-g -O2 ${RC_NONARCH_CFLAGS/-pipe/}"
64 OPTIMIZE_OPTS="ENABLE_OPTIMIZED=1"
65 else
66 CFLAGS="-g"
67 OPTIMIZE_OPTS=
68 fi
6960
7061 ################################################################################
7162 # Run the build.
8475
8576 if [ \! -f Makefile.config ]; then
8677 $SRC_DIR/llvm/configure --prefix=$DEST_DIR$DEST_ROOT \
87 --enable-targets=x86,powerpc,cbe --enable-assertions=$LLVM_ASSERTIONS \
78 --enable-targets=x86,powerpc,cbe \
79 --enable-assertions=$LLVM_ASSERTIONS \
80 --enable-optimized=$LLVM_OPTIMIZED \
8881 || exit 1
8982 fi
9083