summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c3937b9)
raw | patch | inline | side by side (parent: c3937b9)
author | Eric Christopher <echristo@apple.com> | |
Fri, 11 Nov 2011 22:51:42 +0000 (22:51 +0000) | ||
committer | Eric Christopher <echristo@apple.com> | |
Fri, 11 Nov 2011 22:51:42 +0000 (22:51 +0000) |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144413 91177308-0d34-0410-b5e6-96231b3b80d8
Makefile | patch | blob | history | |
Makefile.config.in | patch | blob | history | |
Makefile.rules | patch | blob | history | |
autoconf/configure.ac | patch | blob | history | |
configure | patch | blob | history |
diff --git a/Makefile b/Makefile
index 016768e72e4391053090810a2945649af18cc70e..cc47f0d9cf90464a43205306bbfdb2472b80e38c 100644 (file)
--- a/Makefile
+++ b/Makefile
ENABLE_COVERAGE=$(ENABLE_COVERAGE) \
DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \
ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \
+ ENABLE_LIBCPP=$(ENABLE_LIBCPP) \
CFLAGS= \
CXXFLAGS= \
) || exit 1;
diff --git a/Makefile.config.in b/Makefile.config.in
index 3961cc96c795f4563d2a1b237edbd4b8bc9e51c5..47044a3a8d3da5ec05849e40a7e1400c63671f77 100644 (file)
--- a/Makefile.config.in
+++ b/Makefile.config.in
# These are options that can either be enabled here, or can be enabled on the
# make command line (ie, make ENABLE_PROFILING=1):
+# When ENABLE_LIBCPP is enabled, LLVM uses libc++ by default to build.
+#ENABLE_LIBCPP = 0
+ENABLE_LIBCPP = @ENABLE_LIBCPP@
+
# When ENABLE_OPTIMIZED is enabled, LLVM code is optimized and output is put
# into the "Release" directories. Otherwise, LLVM code is not optimized and
# output is put in the "Debug" directories.
diff --git a/Makefile.rules b/Makefile.rules
index 6b68cf2c6b862641a10bd417244cf0912742a90e..49f5edd9d8459bf7ed92188da84613864667df8a 100644 (file)
--- a/Makefile.rules
+++ b/Makefile.rules
endif
endif
-#CXX.Flags += -stdlib=libc++
-#LD.Flags += -stdlib=libc++
+ifeq ($(ENABLE_LIBCPP),1)
+ CXX.Flags += -stdlib=libc++
+ LD.Flags += -stdlib=libc++
+endif
ifeq ($(ENABLE_PROFILING),1)
BuildMode := $(BuildMode)+Profile
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 6e9d8485866c0bbc2d254e818d01d70e6b910824..090f5dc12d656dd6c912375213ef7a9785a7206c 100644 (file)
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
dnl===
dnl===-----------------------------------------------------------------------===
+dnl --enable-libcpp : check whether or not to use libc++ on the command line
+AC_ARG_ENABLE(libcpp,
+ AS_HELP_STRING([--enable-libcpp],
+ [Use libc++ if available (default is NO)]),,
+ enableval=default)
+case "$enableval" in
+ yes) AC_SUBST(ENABLE_LIBCPP,[1]) ;;
+ no) AC_SUBST(ENABLE_LIBCPP,[0]) ;;
+ default) AC_SUBST(ENABLE_LIBCPP,[0]);;
+ *) AC_MSG_ERROR([Invalid setting for --enable-libcpp. Use "yes" or "no"]) ;;
+esac
+
dnl --enable-optimized : check whether they want to do an optimized build:
AC_ARG_ENABLE(optimized, AS_HELP_STRING(
--enable-optimized,[Compile with optimizations enabled (default is NO)]),,enableval=$optimize)
diff --git a/configure b/configure
index ae6be9d535efaba14eeff86bab1fc1930e37cecf..09173d257f30d42ef8bb16b84b018e520aafd918 100755 (executable)
--- a/configure
+++ b/configure
BUILD_EXEEXT
BUILD_CXX
CVSBUILD
+ENABLE_LIBCPP
ENABLE_OPTIMIZED
ENABLE_PROFILING
DISABLE_ASSERTIONS
--disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
--enable-FEATURE[=ARG] include FEATURE [ARG=yes]
--enable-polly Use polly if available (default is YES)
+ --enable-libcpp Use libc++ if available (default is NO)
--enable-optimized Compile with optimizations enabled (default is NO)
--enable-profiling Compile with profiling enabled (default is NO)
--enable-assertions Compile with assertion checks enabled (default is
(default is YES)
--enable-targets Build specific host targets: all or
target1,target2,... Valid targets are: host, x86,
- x86_64, sparc, powerpc, arm, mips, spu,
- xcore, msp430, ptx, cbe, and cpp (default=all)
+ x86_64, sparc, powerpc, arm, mips, spu, xcore,
+ msp430, ptx, cbe, and cpp (default=all)
--enable-cbe-printf-a Enable C Backend output with hex floating point via
%a (default is YES)
--enable-bindings Build specific language bindings:
fi
+# Check whether --enable-libcpp was given.
+if test "${enable_libcpp+set}" = set; then
+ enableval=$enable_libcpp;
+else
+ enableval=default
+fi
+
+case "$enableval" in
+ yes) ENABLE_LIBCPP=1
+ ;;
+ no) ENABLE_LIBCPP=0
+ ;;
+ default) ENABLE_LIBCPP=0
+;;
+ *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&5
+echo "$as_me: error: Invalid setting for --enable-libcpp. Use \"yes\" or \"no\"" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
# Check whether --enable-optimized was given.
if test "${enable_optimized+set}" = set; then
enableval=$enable_optimized;
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 10463 "configure"
+#line 10479 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
BUILD_EXEEXT!$BUILD_EXEEXT$ac_delim
BUILD_CXX!$BUILD_CXX$ac_delim
CVSBUILD!$CVSBUILD$ac_delim
+ENABLE_LIBCPP!$ENABLE_LIBCPP$ac_delim
ENABLE_OPTIMIZED!$ENABLE_OPTIMIZED$ac_delim
ENABLE_PROFILING!$ENABLE_PROFILING$ac_delim
DISABLE_ASSERTIONS!$DISABLE_ASSERTIONS$ac_delim
ENABLE_PIC!$ENABLE_PIC$ac_delim
ENABLE_SHARED!$ENABLE_SHARED$ac_delim
ENABLE_EMBED_STDCXX!$ENABLE_EMBED_STDCXX$ac_delim
-ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim
LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 90; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5