mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 12:41:49 +01:00
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 llvm-svn: 184808
This commit is contained in:
parent
8b1802841d
commit
71bca32f67
@ -235,6 +235,9 @@ ENABLE_LIBCPP = @ENABLE_LIBCPP@
|
|||||||
# When ENABLE_CXX11 is enabled, LLVM uses c++11 mode by default to build.
|
# When ENABLE_CXX11 is enabled, LLVM uses c++11 mode by default to build.
|
||||||
ENABLE_CXX11 = @ENABLE_CXX11@
|
ENABLE_CXX11 = @ENABLE_CXX11@
|
||||||
|
|
||||||
|
# When ENABLE_SPLIT_DWARF is enabled, LLVM uses -gfission to build in debug mode.
|
||||||
|
ENABLE_SPLIT_DWARF = @ENABLE_SPLIT_DWARF@
|
||||||
|
|
||||||
# When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool.
|
# When ENABLE_CLANG_ARCMT is enabled, clang will have ARCMigrationTool.
|
||||||
ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@
|
ENABLE_CLANG_ARCMT = @ENABLE_CLANG_ARCMT@
|
||||||
|
|
||||||
|
@ -297,8 +297,13 @@ else
|
|||||||
KEEP_SYMBOLS := 1
|
KEEP_SYMBOLS := 1
|
||||||
else
|
else
|
||||||
BuildMode := Debug
|
BuildMode := Debug
|
||||||
|
ifeq ($(ENABLE_SPLIT_DWARF), 1)
|
||||||
|
CXX.Flags += -gsplit-dwarf
|
||||||
|
C.Flags += -gsplit-dwarf
|
||||||
|
else
|
||||||
CXX.Flags += -g
|
CXX.Flags += -g
|
||||||
C.Flags += -g
|
C.Flags += -g
|
||||||
|
endif
|
||||||
KEEP_SYMBOLS := 1
|
KEEP_SYMBOLS := 1
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -510,6 +510,19 @@ case "$enableval" in
|
|||||||
*) AC_MSG_ERROR([Invalid setting for --enable-cxx11. Use "yes" or "no"]) ;;
|
*) AC_MSG_ERROR([Invalid setting for --enable-cxx11. Use "yes" or "no"]) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
dnl --enable-fission : check whether or not to use -gsplit-dwarf on the command
|
||||||
|
dnl line
|
||||||
|
AC_ARG_ENABLE(split-dwarf,
|
||||||
|
AS_HELP_STRING([--enable-split-dwarf],
|
||||||
|
[Use split-dwarf if available (default is NO)]),,
|
||||||
|
enableval=default)
|
||||||
|
case "$enableval" in
|
||||||
|
yes) AC_SUBST(ENABLE_SPLIT_DWARF,[1]) ;;
|
||||||
|
no) AC_SUBST(ENABLE_SPLIT_DWARF,[0]) ;;
|
||||||
|
default) AC_SUBST(ENABLE_SPLIT_DWARF,[0]);;
|
||||||
|
*) AC_MSG_ERROR([Invalid setting for --enable-split-dwarf. Use "yes" or "no"]) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
dnl --enable-clang-arcmt: check whether to enable clang arcmt
|
dnl --enable-clang-arcmt: check whether to enable clang arcmt
|
||||||
clang_arcmt="yes"
|
clang_arcmt="yes"
|
||||||
AC_ARG_ENABLE(clang-arcmt,
|
AC_ARG_ENABLE(clang-arcmt,
|
||||||
|
30
configure
vendored
30
configure
vendored
@ -685,6 +685,7 @@ BUILD_CXX
|
|||||||
CVSBUILD
|
CVSBUILD
|
||||||
ENABLE_LIBCPP
|
ENABLE_LIBCPP
|
||||||
ENABLE_CXX11
|
ENABLE_CXX11
|
||||||
|
ENABLE_SPLIT_DWARF
|
||||||
ENABLE_CLANG_ARCMT
|
ENABLE_CLANG_ARCMT
|
||||||
ENABLE_CLANG_STATIC_ANALYZER
|
ENABLE_CLANG_STATIC_ANALYZER
|
||||||
ENABLE_CLANG_REWRITER
|
ENABLE_CLANG_REWRITER
|
||||||
@ -1406,6 +1407,7 @@ Optional Features:
|
|||||||
--enable-polly Use polly if available (default is YES)
|
--enable-polly Use polly if available (default is YES)
|
||||||
--enable-libcpp Use libc++ if available (default is NO)
|
--enable-libcpp Use libc++ if available (default is NO)
|
||||||
--enable-cxx11 Use c++11 if available (default is NO)
|
--enable-cxx11 Use c++11 if available (default is NO)
|
||||||
|
--enable-split-dwarf Use split-dwarf if available (default is NO)
|
||||||
--enable-clang-arcmt Enable building of clang ARCMT (default is YES)
|
--enable-clang-arcmt Enable building of clang ARCMT (default is YES)
|
||||||
--enable-clang-static-analyzer
|
--enable-clang-static-analyzer
|
||||||
Enable building of clang Static Analyzer (default is
|
Enable building of clang Static Analyzer (default is
|
||||||
@ -5165,6 +5167,25 @@ echo "$as_me: error: Invalid setting for --enable-cxx11. Use \"yes\" or \"no\""
|
|||||||
{ (exit 1); exit 1; }; } ;;
|
{ (exit 1); exit 1; }; } ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Check whether --enable-split-dwarf was given.
|
||||||
|
if test "${enable_split_dwarf+set}" = set; then
|
||||||
|
enableval=$enable_split_dwarf;
|
||||||
|
else
|
||||||
|
enableval=default
|
||||||
|
fi
|
||||||
|
|
||||||
|
case "$enableval" in
|
||||||
|
yes) ENABLE_SPLIT_DWARF=1
|
||||||
|
;;
|
||||||
|
no) ENABLE_SPLIT_DWARF=0
|
||||||
|
;;
|
||||||
|
default) ENABLE_SPLIT_DWARF=0
|
||||||
|
;;
|
||||||
|
*) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-split-dwarf. Use \"yes\" or \"no\"" >&5
|
||||||
|
echo "$as_me: error: Invalid setting for --enable-split-dwarf. Use \"yes\" or \"no\"" >&2;}
|
||||||
|
{ (exit 1); exit 1; }; } ;;
|
||||||
|
esac
|
||||||
|
|
||||||
clang_arcmt="yes"
|
clang_arcmt="yes"
|
||||||
# Check whether --enable-clang-arcmt was given.
|
# Check whether --enable-clang-arcmt was given.
|
||||||
if test "${enable_clang_arcmt+set}" = set; then
|
if test "${enable_clang_arcmt+set}" = set; then
|
||||||
@ -10518,7 +10539,7 @@ else
|
|||||||
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
|
||||||
lt_status=$lt_dlunknown
|
lt_status=$lt_dlunknown
|
||||||
cat > conftest.$ac_ext <<EOF
|
cat > conftest.$ac_ext <<EOF
|
||||||
#line 10521 "configure"
|
#line 10542 "configure"
|
||||||
#include "confdefs.h"
|
#include "confdefs.h"
|
||||||
|
|
||||||
#if HAVE_DLFCN_H
|
#if HAVE_DLFCN_H
|
||||||
@ -23349,6 +23370,7 @@ BUILD_CXX!$BUILD_CXX$ac_delim
|
|||||||
CVSBUILD!$CVSBUILD$ac_delim
|
CVSBUILD!$CVSBUILD$ac_delim
|
||||||
ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim
|
ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim
|
||||||
ENABLE_CXX11!$ENABLE_CXX11$ac_delim
|
ENABLE_CXX11!$ENABLE_CXX11$ac_delim
|
||||||
|
ENABLE_SPLIT_DWARF!$ENABLE_SPLIT_DWARF$ac_delim
|
||||||
ENABLE_CLANG_ARCMT!$ENABLE_CLANG_ARCMT$ac_delim
|
ENABLE_CLANG_ARCMT!$ENABLE_CLANG_ARCMT$ac_delim
|
||||||
ENABLE_CLANG_STATIC_ANALYZER!$ENABLE_CLANG_STATIC_ANALYZER$ac_delim
|
ENABLE_CLANG_STATIC_ANALYZER!$ENABLE_CLANG_STATIC_ANALYZER$ac_delim
|
||||||
ENABLE_CLANG_REWRITER!$ENABLE_CLANG_REWRITER$ac_delim
|
ENABLE_CLANG_REWRITER!$ENABLE_CLANG_REWRITER$ac_delim
|
||||||
@ -23362,7 +23384,6 @@ DEBUG_RUNTIME!$DEBUG_RUNTIME$ac_delim
|
|||||||
DEBUG_SYMBOLS!$DEBUG_SYMBOLS$ac_delim
|
DEBUG_SYMBOLS!$DEBUG_SYMBOLS$ac_delim
|
||||||
KEEP_SYMBOLS!$KEEP_SYMBOLS$ac_delim
|
KEEP_SYMBOLS!$KEEP_SYMBOLS$ac_delim
|
||||||
JIT!$JIT$ac_delim
|
JIT!$JIT$ac_delim
|
||||||
TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||||
@ -23404,6 +23425,7 @@ _ACEOF
|
|||||||
ac_delim='%!_!# '
|
ac_delim='%!_!# '
|
||||||
for ac_last_try in false false false false false :; do
|
for ac_last_try in false false false false false :; do
|
||||||
cat >conf$$subs.sed <<_ACEOF
|
cat >conf$$subs.sed <<_ACEOF
|
||||||
|
TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
|
||||||
ENABLE_DOCS!$ENABLE_DOCS$ac_delim
|
ENABLE_DOCS!$ENABLE_DOCS$ac_delim
|
||||||
ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
|
ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
|
||||||
LLVM_ENABLE_THREADS!$LLVM_ENABLE_THREADS$ac_delim
|
LLVM_ENABLE_THREADS!$LLVM_ENABLE_THREADS$ac_delim
|
||||||
@ -23500,7 +23522,6 @@ LLVM_MANDIR!$LLVM_MANDIR$ac_delim
|
|||||||
LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim
|
LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim
|
||||||
BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim
|
BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim
|
||||||
ALL_BINDINGS!$ALL_BINDINGS$ac_delim
|
ALL_BINDINGS!$ALL_BINDINGS$ac_delim
|
||||||
OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim
|
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
|
||||||
@ -23542,6 +23563,7 @@ _ACEOF
|
|||||||
ac_delim='%!_!# '
|
ac_delim='%!_!# '
|
||||||
for ac_last_try in false false false false false :; do
|
for ac_last_try in false false false false false :; do
|
||||||
cat >conf$$subs.sed <<_ACEOF
|
cat >conf$$subs.sed <<_ACEOF
|
||||||
|
OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim
|
||||||
ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
|
ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
|
||||||
RPATH!$RPATH$ac_delim
|
RPATH!$RPATH$ac_delim
|
||||||
RDYNAMIC!$RDYNAMIC$ac_delim
|
RDYNAMIC!$RDYNAMIC$ac_delim
|
||||||
@ -23550,7 +23572,7 @@ LIBOBJS!$LIBOBJS$ac_delim
|
|||||||
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
LTLIBOBJS!$LTLIBOBJS$ac_delim
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 6; then
|
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then
|
||||||
break
|
break
|
||||||
elif $ac_last_try; then
|
elif $ac_last_try; then
|
||||||
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
|
||||||
|
Loading…
x
Reference in New Issue
Block a user