llvm.org GIT mirror llvm / 8eac886
autoconf: Add --disable-embed-stdcxx to suppress linking libstdc++.a into llvm.dll with --enable-shared on Cygming. Cygwin has stdc++.dll in it's distribution, and we can assume distro's stdc++.dll might be available. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122622 91177308-0d34-0410-b5e6-96231b3b80d8 NAKAMURA Takumi 8 years ago
4 changed file(s) with 45 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
278278 # Do we want to build a shared library and link the tools with it?
279279 ENABLE_SHARED := @ENABLE_SHARED@
280280
281 # Do we want to link the stdc++ into a shared library? (Cygming)
282 ENABLE_EMBED_STDCXX := @ENABLE_EMBED_STDCXX@
283
281284 # Use -fvisibility-inlines-hidden?
282285 ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@
283286
567567 *) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;;
568568 esac
569569
570 dnl Allow libstdc++ is embedded in LLVM.dll.
571 AC_ARG_ENABLE(embed-stdcxx,
572 AS_HELP_STRING([--enable-embed-stdcxx],
573 [Build a shared library with embedded libstdc++ for Win32 DLL (default is YES)]),,
574 enableval=default)
575 case "$enableval" in
576 yes) AC_SUBST(ENABLE_EMBED_STDCXX,[1]) ;;
577 no) AC_SUBST(ENABLE_EMBED_STDCXX,[0]) ;;
578 default) AC_SUBST(ENABLE_EMBED_STDCXX,[1]) ;;
579 *) AC_MSG_ERROR([Invalid setting for --enable-embed-stdcxx. Use "yes" or "no"]) ;;
580 esac
581
570582 dnl Enable embedding timestamp information into build.
571583 AC_ARG_ENABLE(timestamps,
572584 AS_HELP_STRING([--enable-timestamps],
693693 ENABLE_PTHREADS
694694 ENABLE_PIC
695695 ENABLE_SHARED
696 ENABLE_EMBED_STDCXX
696697 ENABLE_TIMESTAMPS
697698 TARGETS_TO_BUILD
698699 LLVM_ENUM_TARGETS
14201421 is YES)
14211422 --enable-shared Build a shared library and link tools against it
14221423 (default is NO)
1424 --enable-embed-stdcxx Build a shared library with embedded libstdc++ for
1425 Win32 DLL (default is YES)
14231426 --enable-timestamps Enable embedding timestamp information in build
14241427 (default is YES)
14251428 --enable-targets Build specific host targets: all or
49985001 { (exit 1); exit 1; }; } ;;
49995002 esac
50005003
5004 # Check whether --enable-embed-stdcxx was given.
5005 if test "${enable_embed_stdcxx+set}" = set; then
5006 enableval=$enable_embed_stdcxx;
5007 else
5008 enableval=default
5009 fi
5010
5011 case "$enableval" in
5012 yes) ENABLE_EMBED_STDCXX=1
5013 ;;
5014 no) ENABLE_EMBED_STDCXX=0
5015 ;;
5016 default) ENABLE_EMBED_STDCXX=1
5017 ;;
5018 *) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-embed-stdcxx. Use \"yes\" or \"no\"" >&5
5019 echo "$as_me: error: Invalid setting for --enable-embed-stdcxx. Use \"yes\" or \"no\"" >&2;}
5020 { (exit 1); exit 1; }; } ;;
5021 esac
5022
50015023 # Check whether --enable-timestamps was given.
50025024 if test "${enable_timestamps+set}" = set; then
50035025 enableval=$enable_timestamps;
1153811560 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1153911561 lt_status=$lt_dlunknown
1154011562 cat > conftest.$ac_ext <
11541 #line 11542 "configure"
11563 #line 11564 "configure"
1154211564 #include "confdefs.h"
1154311565
1154411566 #if HAVE_DLFCN_H
2181121833 ENABLE_PTHREADS!$ENABLE_PTHREADS$ac_delim
2181221834 ENABLE_PIC!$ENABLE_PIC$ac_delim
2181321835 ENABLE_SHARED!$ENABLE_SHARED$ac_delim
21836 ENABLE_EMBED_STDCXX!$ENABLE_EMBED_STDCXX$ac_delim
2181421837 ENABLE_TIMESTAMPS!$ENABLE_TIMESTAMPS$ac_delim
2181521838 TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
2181621839 LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim
2181721840 LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim
21818 LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim
2181921841 _ACEOF
2182021842
2182121843 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2185721879 ac_delim='%!_!# '
2185821880 for ac_last_try in false false false false false :; do
2185921881 cat >conf$$subs.sed <<_ACEOF
21882 LLVM_ENUM_ASM_PARSERS!$LLVM_ENUM_ASM_PARSERS$ac_delim
2186021883 LLVM_ENUM_DISASSEMBLERS!$LLVM_ENUM_DISASSEMBLERS$ac_delim
2186121884 ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim
2186221885 CLANGPATH!$CLANGPATH$ac_delim
2195321976 BINDINGS_TO_BUILD!$BINDINGS_TO_BUILD$ac_delim
2195421977 ALL_BINDINGS!$ALL_BINDINGS$ac_delim
2195521978 OCAML_LIBDIR!$OCAML_LIBDIR$ac_delim
21956 ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
2195721979 _ACEOF
2195821980
2195921981 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2199522017 ac_delim='%!_!# '
2199622018 for ac_last_try in false false false false false :; do
2199722019 cat >conf$$subs.sed <<_ACEOF
22020 ENABLE_VISIBILITY_INLINES_HIDDEN!$ENABLE_VISIBILITY_INLINES_HIDDEN$ac_delim
2199822021 RPATH!$RPATH$ac_delim
2199922022 RDYNAMIC!$RDYNAMIC$ac_delim
2200022023 LIBOBJS!$LIBOBJS$ac_delim
2200122024 LTLIBOBJS!$LTLIBOBJS$ac_delim
2200222025 _ACEOF
2200322026
22004 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 4; then
22027 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 5; then
2200522028 break
2200622029 elif $ac_last_try; then
2200722030 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
1717 include $(LEVEL)/Makefile.config
1818
1919 ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
20 EXPORTED_SYMBOL_FILE = $(ObjDir)/$(LIBRARYNAME).exports
20 EXPORTED_SYMBOL_FILE = $(ObjDir)/$(LIBRARYNAME).exports
2121
22 ifeq (1,$(ENABLE_EMBED_STDCXX))
2223 # It is needed to force static-stdc++.a linked.
23 # FIXME: It should be omitted when configure detects system's stdc++.dll.
2424 SHLIB_FRAG_NAMES += stdc++.a.o
25 endif
2526
2627 endif
2728