summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.config.in3
-rw-r--r--autoconf/configure.ac12
-rwxr-xr-xconfigure31
-rw-r--r--tools/llvm-shlib/Makefile5
4 files changed, 45 insertions, 6 deletions
diff --git a/Makefile.config.in b/Makefile.config.in
index 73d2d871f4..5c73758063 100644
--- a/Makefile.config.in
+++ b/Makefile.config.in
@@ -279,6 +279,9 @@ ENABLE_PIC := @ENABLE_PIC@
# Do we want to build a shared library and link the tools with it?
ENABLE_SHARED := @ENABLE_SHARED@
+# Do we want to link the stdc++ into a shared library? (Cygming)
+ENABLE_EMBED_STDCXX := @ENABLE_EMBED_STDCXX@
+
# Use -fvisibility-inlines-hidden?
ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 93a31c894a..0cc3d3ef50 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -568,6 +568,18 @@ case "$enableval" in
*) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;;
esac
+dnl Allow libstdc++ is embedded in LLVM.dll.
+AC_ARG_ENABLE(embed-stdcxx,
+ AS_HELP_STRING([--enable-embed-stdcxx],
+ [Build a shared library with embedded libstdc++ for Win32 DLL (default is YES)]),,
+ enableval=default)
+case "$enableval" in
+ yes) AC_SUBST(ENABLE_EMBED_STDCXX,[1]) ;;
+ no) AC_SUBST(ENABLE_EMBED_STDCXX,[0]) ;;
+ default) AC_SUBST(ENABLE_EMBED_STDCXX,[1]) ;;
+ *) AC_MSG_ERROR([Invalid setting for --enable-embed-stdcxx. Use "yes" or "no"]) ;;
+esac
+
dnl Enable embedding timestamp information into build.
AC_ARG_ENABLE(timestamps,
AS_HELP_STRING([--enable-timestamps],
diff --git a/configure b/configure
index ac2488928e..2a739d3efb 100755
--- a/configure
+++ b/configure
@@ -694,6 +694,7 @@ ENABLE_THREADS
ENABLE_PTHREADS
ENABLE_PIC
ENABLE_SHARED
+ENABLE_EMBED_STDCXX
ENABLE_TIMESTAMPS
TARGETS_TO_BUILD
LLVM_ENUM_TARGETS
@@ -1421,6 +1422,8 @@ Optional Features:
is YES)
--enable-shared Build a shared library and link tools against it
(default is NO)
+ --enable-embed-stdcxx Build a shared library with embedded libstdc++ for
+ Win32 DLL (default is YES)
--enable-timestamps Enable embedding timestamp information in build
(default is YES)
--enable-targets Build specific host targets: all or
@@ -4999,6 +5002,25 @@ echo "$as_me: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\""
{ (exit 1); exit 1; }; } ;;
esac
+# Check whether --enable-embed-stdcxx was given.
+if test "${enable_embed_stdcxx+set}" = set; then
+ enableval=$enable_embed_stdcxx;
+else
+ enableval=default
+fi
+
+case "$enableval" in
+ yes) ENABLE_EMBED_STDCXX=1
+ ;;
+ no) ENABLE_EMBED_STDCXX=0
+ ;;
+ default) ENABLE_EMBED_STDCXX=1
+ ;;
+ *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-embed-stdcxx. Use \"yes\" or \"no\"" >&5
+echo "$as_me: error: Invalid setting for --enable-embed-stdcxx. Use \"yes\" or \"no\"" >&2;}
+ { (exit 1); exit 1; }; } ;;
+esac
+
# Check whether --enable-timestamps was given.
if test "${enable_timestamps+set}" = set; then
enableval=$enable_timestamps;
@@ -11539,7 +11561,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
-#line 11542 "configure"
+#line 11564 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -21812,11 +21834,11 @@ ENABLE_THREADS!$ENABLE_THREADS$ac_delim
ENABLE_PTHREADS!$ENABLE_PTHREADS$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
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
-LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -21858,6 +21880,7 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim
LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim
ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim
CLANGPATH!$CLANGPATH$ac_delim
@@ -21954,7 +21977,6 @@ LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim
BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim
ALL_BINDINGS!$ALL_BINDINGS$ac_delim
OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim
-ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
_ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -21996,13 +22018,14 @@ _ACEOF
ac_delim='%!_!# '
for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF
+ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
RPATH!$RPATH$ac_delim
RDYNAMIC!$RDYNAMIC$ac_delim
LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF
- if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 4; then
+ if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 5; then
break
elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile
index 60b54350ee..e7605c8f4e 100644
--- a/tools/llvm-shlib/Makefile
+++ b/tools/llvm-shlib/Makefile
@@ -18,11 +18,12 @@ SHARED_LIBRARY = 1
include $(LEVEL)/Makefile.config
ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
- EXPORTED_SYMBOL_FILE = $(ObjDir)/$(LIBRARYNAME).exports
+ EXPORTED_SYMBOL_FILE = $(ObjDir)/$(LIBRARYNAME).exports
+ ifeq (1,$(ENABLE_EMBED_STDCXX))
# It is needed to force static-stdc++.a linked.
- # FIXME: It should be omitted when configure detects system's stdc++.dll.
SHLIB_FRAG_NAMES += stdc++.a.o
+ endif
endif