llvm.org GIT mirror llvm / bee515f
Add an option '--enable-libcpp' that will have the compiler pass on options to use libc++ as the default c++ library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144413 91177308-0d34-0410-b5e6-96231b3b80d8 Eric Christopher 7 years ago
5 changed file(s) with 48 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
130130 ENABLE_COVERAGE=$(ENABLE_COVERAGE) \
131131 DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \
132132 ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \
133 ENABLE_LIBCPP=$(ENABLE_LIBCPP) \
133134 CFLAGS= \
134135 CXXFLAGS= \
135136 ) || exit 1;
207207 # These are options that can either be enabled here, or can be enabled on the
208208 # make command line (ie, make ENABLE_PROFILING=1):
209209
210 # When ENABLE_LIBCPP is enabled, LLVM uses libc++ by default to build.
211 #ENABLE_LIBCPP = 0
212 ENABLE_LIBCPP = @ENABLE_LIBCPP@
213
210214 # When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
211215 # into the "Release" directories. Otherwise, LLVM code is not optimized and
212216 # output is put in the "Debug" directories.
300300 endif
301301 endif
302302
303 #CXX.Flags += -stdlib=libc++
304 #LD.Flags += -stdlib=libc++
303 ifeq ($(ENABLE_LIBCPP),1)
304 CXX.Flags += -stdlib=libc++
305 LD.Flags += -stdlib=libc++
306 endif
305307
306308 ifeq ($(ENABLE_PROFILING),1)
307309 BuildMode := $(BuildMode)+Profile
414414 dnl===
415415 dnl===-----------------------------------------------------------------------===
416416
417 dnl --enable-libcpp : check whether or not to use libc++ on the command line
418 AC_ARG_ENABLE(libcpp,
419 AS_HELP_STRING([--enable-libcpp],
420 [Use libc++ if available (default is NO)]),,
421 enableval=default)
422 case "$enableval" in
423 yes) AC_SUBST(ENABLE_LIBCPP,[1]) ;;
424 no) AC_SUBST(ENABLE_LIBCPP,[0]) ;;
425 default) AC_SUBST(ENABLE_LIBCPP,[0]);;
426 *) AC_MSG_ERROR([Invalid setting for --enable-libcpp. Use "yes" or "no"]) ;;
427 esac
428
417429 dnl --enable-optimized : check whether they want to do an optimized build:
418430 AC_ARG_ENABLE(optimized, AS_HELP_STRING(
419431 --enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
681681 BUILD_EXEEXT
682682 BUILD_CXX
683683 CVSBUILD
684 ENABLE_LIBCPP
684685 ENABLE_OPTIMIZED
685686 ENABLE_PROFILING
686687 DISABLE_ASSERTIONS
13881389 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
13891390 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
13901391 --enable-polly Use polly if available (default is YES)
1392 --enable-libcpp Use libc++ if available (default is NO)
13911393 --enable-optimized Compile with optimizations enabled (default is NO)
13921394 --enable-profiling Compile with profiling enabled (default is NO)
13931395 --enable-assertions Compile with assertion checks enabled (default is
14141416 (default is YES)
14151417 --enable-targets Build specific host targets: all or
14161418 target1,target2,... Valid targets are: host, x86,
1417 x86_64, sparc, powerpc, arm, mips, spu,
1418 xcore, msp430, ptx, cbe, and cpp (default=all)
1419 x86_64, sparc, powerpc, arm, mips, spu, xcore,
1420 msp430, ptx, cbe, and cpp (default=all)
14191421 --enable-cbe-printf-a Enable C Backend output with hex floating point via
14201422 %a (default is YES)
14211423 --enable-bindings Build specific language bindings:
49554957 fi
49564958
49574959
4960 # Check whether --enable-libcpp was given.
4961 if test "${enable_libcpp+set}" = set; then
4962 enableval=$enable_libcpp;
4963 else
4964 enableval=default
4965 fi
4966
4967 case "$enableval" in
4968 yes) ENABLE_LIBCPP=1
4969 ;;
4970 no) ENABLE_LIBCPP=0
4971 ;;
4972 default) ENABLE_LIBCPP=0
4973 ;;
4974 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&5
4975 echo "$as_me: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&2;}
4976 { (exit 1); exit 1; }; } ;;
4977 esac
4978
49584979 # Check whether --enable-optimized was given.
49594980 if test "${enable_optimized+set}" = set; then
49604981 enableval=$enable_optimized;
1045410475 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1045510476 lt_status=$lt_dlunknown
1045610477 cat > conftest.$ac_ext <
10457 #line 10463 "configure"
10478 #line 10479 "configure"
1045810479 #include "confdefs.h"
1045910480
1046010481 #if HAVE_DLFCN_H
2184421865 BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim
2184521866 BUILD_CXX!$BUILD_CXX$ac_delim
2184621867 CVSBUILD!$CVSBUILD$ac_delim
21868 ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim
2184721869 ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim
2184821870 ENABLE_PROFILING!$ENABLE_PROFILING$ac_delim
2184921871 DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim
2186021882 ENABLE_PIC!$ENABLE_PIC$ac_delim
2186121883 ENABLE_SHARED!$ENABLE_SHARED$ac_delim
2186221884 ENABLE_EMBED_STDCXX!$ENABLE_EMBED_STDCXX$ac_delim
21863 ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
2186421885 _ACEOF
2186521886
2186621887 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2190221923 ac_delim='%!_!# '
2190321924 for ac_last_try in false false false false false :; do
2190421925 cat >conf$$subs.sed <<_ACEOF
21926 ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
2190521927 TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
2190621928 LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim
2190721929 LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim
2199322015 LTLIBOBJS!$LTLIBOBJS$ac_delim
2199422016 _ACEOF
2199522017
21996 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
22018 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
2199722019 break
2199822020 elif $ac_last_try; then
2199922021 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5