llvm.org GIT mirror llvm / 1baa381
Add an autoconf option for turning on -gsplit-dwarf by default when building llvm. This saves quite a bit of time and space when linking. Please report any problems via bugzilla. Caveats: a) This will only work on linux b) This requires a fairly new binutils c) This requires a fairly new gdb git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@184808 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 6 years ago
4 changed file(s) with 47 addition(s) and 4 deletion(s). Raw diff Collapse all Expand all
234234 # When ENABLE_CXX11 is enabled, LLVM uses c++11 mode by default to build.
235235 ENABLE_CXX11 = @ENABLE_CXX11@
236236
237 # When ENABLE_SPLIT_DWARF is enabled, LLVM uses -gfission to build in debug mode.
238 ENABLE_SPLIT_DWARF = @ENABLE_SPLIT_DWARF@
239
237240 # When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool.
238241 ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@
239242
296296 KEEP_SYMBOLS := 1
297297 else
298298 BuildMode := Debug
299 ifeq ($(ENABLE_SPLIT_DWARF), 1)
300 CXX.Flags += -gsplit-dwarf
301 C.Flags += -gsplit-dwarf
302 else
299303 CXX.Flags += -g
300304 C.Flags += -g
305 endif
301306 KEEP_SYMBOLS := 1
302307 endif
303308 endif
509509 *) AC_MSG_ERROR([Invalid setting for --enable-cxx11. Use "yes" or "no"]) ;;
510510 esac
511511
512 dnl --enable-fission : check whether or not to use -gsplit-dwarf on the command
513 dnl line
514 AC_ARG_ENABLE(split-dwarf,
515 AS_HELP_STRING([--enable-split-dwarf],
516 [Use split-dwarf if available (default is NO)]),,
517 enableval=default)
518 case "$enableval" in
519 yes) AC_SUBST(ENABLE_SPLIT_DWARF,[1]) ;;
520 no) AC_SUBST(ENABLE_SPLIT_DWARF,[0]) ;;
521 default) AC_SUBST(ENABLE_SPLIT_DWARF,[0]);;
522 *) AC_MSG_ERROR([Invalid setting for --enable-split-dwarf. Use "yes" or "no"]) ;;
523 esac
524
512525 dnl --enable-clang-arcmt: check whether to enable clang arcmt
513526 clang_arcmt="yes"
514527 AC_ARG_ENABLE(clang-arcmt,
684684 CVSBUILD
685685 ENABLE_LIBCPP
686686 ENABLE_CXX11
687 ENABLE_SPLIT_DWARF
687688 ENABLE_CLANG_ARCMT
688689 ENABLE_CLANG_STATIC_ANALYZER
689690 ENABLE_CLANG_REWRITER
14051406 --enable-polly Use polly if available (default is YES)
14061407 --enable-libcpp Use libc++ if available (default is NO)
14071408 --enable-cxx11 Use c++11 if available (default is NO)
1409 --enable-split-dwarf Use split-dwarf if available (default is NO)
14081410 --enable-clang-arcmt Enable building of clang ARCMT (default is YES)
14091411 --enable-clang-static-analyzer
14101412 Enable building of clang Static Analyzer (default is
51645166 { (exit 1); exit 1; }; } ;;
51655167 esac
51665168
5169 # Check whether --enable-split-dwarf was given.
5170 if test "${enable_split_dwarf+set}" = set; then
5171 enableval=$enable_split_dwarf;
5172 else
5173 enableval=default
5174 fi
5175
5176 case "$enableval" in
5177 yes) ENABLE_SPLIT_DWARF=1
5178 ;;
5179 no) ENABLE_SPLIT_DWARF=0
5180 ;;
5181 default) ENABLE_SPLIT_DWARF=0
5182 ;;
5183 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-split-dwarf. Use \"yes\" or \"no\"" >&5
5184 echo "$as_me: error: Invalid setting for --enable-split-dwarf. Use \"yes\" or \"no\"" >&2;}
5185 { (exit 1); exit 1; }; } ;;
5186 esac
5187
51675188 clang_arcmt="yes"
51685189 # Check whether --enable-clang-arcmt was given.
51695190 if test "${enable_clang_arcmt+set}" = set; then
1051710538 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1051810539 lt_status=$lt_dlunknown
1051910540 cat > conftest.$ac_ext <
10520 #line 10521 "configure"
10541 #line 10542 "configure"
1052110542 #include "confdefs.h"
1052210543
1052310544 #if HAVE_DLFCN_H
2334823369 CVSBUILD!$CVSBUILD$ac_delim
2334923370 ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim
2335023371 ENABLE_CXX11!$ENABLE_CXX11$ac_delim
23372 ENABLE_SPLIT_DWARF!$ENABLE_SPLIT_DWARF$ac_delim
2335123373 ENABLE_CLANG_ARCMT!$ENABLE_CLANG_ARCMT$ac_delim
2335223374 ENABLE_CLANG_STATIC_ANALYZER!$ENABLE_CLANG_STATIC_ANALYZER$ac_delim
2335323375 ENABLE_CLANG_REWRITER!$ENABLE_CLANG_REWRITER$ac_delim
2336123383 DEBUG_SYMBOLS!$DEBUG_SYMBOLS$ac_delim
2336223384 KEEP_SYMBOLS!$KEEP_SYMBOLS$ac_delim
2336323385 JIT!$JIT$ac_delim
23364 TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
2336523386 _ACEOF
2336623387
2336723388 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2340323424 ac_delim='%!_!# '
2340423425 for ac_last_try in false false false false false :; do
2340523426 cat >conf$$subs.sed <<_ACEOF
23427 TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
2340623428 ENABLE_DOCS!$ENABLE_DOCS$ac_delim
2340723429 ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
2340823430 LLVM_ENABLE_THREADS!$LLVM_ENABLE_THREADS$ac_delim
2349923521 LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim
2350023522 BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim
2350123523 ALL_BINDINGS!$ALL_BINDINGS$ac_delim
23502 OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim
2350323524 _ACEOF
2350423525
2350523526 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2354123562 ac_delim='%!_!# '
2354223563 for ac_last_try in false false false false false :; do
2354323564 cat >conf$$subs.sed <<_ACEOF
23565 OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim
2354423566 ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
2354523567 RPATH!$RPATH$ac_delim
2354623568 RDYNAMIC!$RDYNAMIC$ac_delim
2354923571 LTLIBOBJS!$LTLIBOBJS$ac_delim
2355023572 _ACEOF
2355123573
23552 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 6; then
23574 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then
2355323575 break
2355423576 elif $ac_last_try; then
2355523577 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5