summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2010-11-26 09:32:02 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2010-11-26 09:32:02 +0000
commit98fa0159fcc6d8b4c7f61ab727b9e110863b35fc (patch)
tree632b5225918669692968b41b9688bb3b35ae8f3c /llvm
parente1e8565cd97ea80adebb9cfcc1f01979ae43c643 (diff)
downloadbcm5719-llvm-98fa0159fcc6d8b4c7f61ab727b9e110863b35fc.tar.gz
bcm5719-llvm-98fa0159fcc6d8b4c7f61ab727b9e110863b35fc.zip
unittests/JITTests: Don't use --export-dynamic but --export-all-symbols on cygming.
GNU ld/PECOFF accepts but ignores them below; --version-script --export-dynamic --rpath FIXME: autoconf should be aware of them. llvm-svn: 120179
Diffstat (limited to 'llvm')
-rw-r--r--llvm/Makefile.rules16
-rw-r--r--llvm/unittests/CMakeLists.txt4
-rw-r--r--llvm/unittests/Makefile.unittest8
3 files changed, 20 insertions, 8 deletions
diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules
index 410a1422a88..21686aa2428 100644
--- a/llvm/Makefile.rules
+++ b/llvm/Makefile.rules
@@ -392,6 +392,17 @@ endif
LD.Flags += -Wl,--no-relax
endif
+# GNU ld/PECOFF accepts but ignores them below;
+# --version-script
+# --export-dynamic
+# --rpath
+# FIXME: autoconf should be aware of them.
+ifneq (,$(filter $(HOST_OS),Cygwin MingW))
+ HAVE_LINK_VERSION_SCRIPT := 0
+ RPATH :=
+ RDYNAMIC := -Wl,--export-all-symbols
+endif
+
#--------------------------------------------------------------------
# Directory locations
#--------------------------------------------------------------------
@@ -949,11 +960,6 @@ ifdef EXPORTED_SYMBOL_FILE
# First, set up the native export file, which may differ from the source
# export file.
-# The option --version-script is not effective on GNU ld win32.
-ifneq (,$(filter $(HOST_OS),Cygwin MingW))
- HAVE_LINK_VERSION_SCRIPT := 0
-endif
-
ifeq ($(HOST_OS),Darwin)
# Darwin convention prefixes symbols with underscores.
NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).sed
diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt
index 41e20cfc902..7953fac3bfa 100644
--- a/llvm/unittests/CMakeLists.txt
+++ b/llvm/unittests/CMakeLists.txt
@@ -82,6 +82,10 @@ endif()
add_llvm_unittest(JIT ${JITTestsSources})
+if(MINGW)
+ set_property(TARGET JITTests PROPERTY LINK_FLAGS -Wl,--export-all-symbols)
+endif()
+
add_llvm_unittest(Transforms
Transforms/Utils/Cloning.cpp
)
diff --git a/llvm/unittests/Makefile.unittest b/llvm/unittests/Makefile.unittest
index 9a75b2c2eb8..8be6174cb90 100644
--- a/llvm/unittests/Makefile.unittest
+++ b/llvm/unittests/Makefile.unittest
@@ -35,9 +35,11 @@ endif
TESTLIBS = -lGoogleTest -lUnitTestMain
ifeq ($(ENABLE_SHARED), 1)
- # Add the absolute path to the dynamic library. This is ok because
- # we'll never install unittests.
- LD.Flags += $(RPATH) -Wl,$(SharedLibDir)
+ ifneq (,$(RPATH))
+ # Add the absolute path to the dynamic library. This is ok because
+ # we'll never install unittests.
+ LD.Flags += $(RPATH) -Wl,$(SharedLibDir)
+ endif
# Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most
# of the time.
Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)"
OpenPOWER on IntegriCloud