[llvm-commits] [llvm] r120179 - in /llvm/trunk: Makefile.rules unittests/CMakeLists.txt unittests/Makefile.unittest

NAKAMURA Takumi geek4civic at gmail.com
Fri Nov 26 01:32:02 PST 2010


Author: chapuni
Date: Fri Nov 26 03:32:02 2010
New Revision: 120179

URL: http://llvm.org/viewvc/llvm-project?rev=120179&view=rev
Log:
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.

Modified:
    llvm/trunk/Makefile.rules
    llvm/trunk/unittests/CMakeLists.txt
    llvm/trunk/unittests/Makefile.unittest

Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=120179&r1=120178&r2=120179&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Fri Nov 26 03:32:02 2010
@@ -392,6 +392,17 @@
   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 @@
 # 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

Modified: llvm/trunk/unittests/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/CMakeLists.txt?rev=120179&r1=120178&r2=120179&view=diff
==============================================================================
--- llvm/trunk/unittests/CMakeLists.txt (original)
+++ llvm/trunk/unittests/CMakeLists.txt Fri Nov 26 03:32:02 2010
@@ -82,6 +82,10 @@
 
 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
   )

Modified: llvm/trunk/unittests/Makefile.unittest
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Makefile.unittest?rev=120179&r1=120178&r2=120179&view=diff
==============================================================================
--- llvm/trunk/unittests/Makefile.unittest (original)
+++ llvm/trunk/unittests/Makefile.unittest Fri Nov 26 03:32:02 2010
@@ -35,9 +35,11 @@
 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)"





More information about the llvm-commits mailing list