mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:40:38 +00:00
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. llvm-svn: 122622
This commit is contained in:
parent
ec5eb9ed74
commit
4d8db8b43c
@ -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@
|
||||
|
||||
|
@ -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],
|
||||
|
31
configure
vendored
31
configure
vendored
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user