]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - opencl/llvm.git/commitdiff
Build with the $RDYNAMIC flag on Darwin as well as other platforms.
authorBob Wilson <bob.wilson@apple.com>
Sun, 4 Aug 2013 22:06:11 +0000 (22:06 +0000)
committerBob Wilson <bob.wilson@apple.com>
Sun, 4 Aug 2013 22:06:11 +0000 (22:06 +0000)
Part of <rdar://problem/14620988>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187710 91177308-0d34-0410-b5e6-96231b3b80d8

Makefile.rules
projects/sample/Makefile.llvm.rules

index ab31808dda252d27b8a49919615523f889e89a02..735cbacdcbf3a51d5afda3845c271138a00fe202 100644 (file)
@@ -612,17 +612,14 @@ ifndef KEEP_SYMBOLS
   Install.StripFlag += -s
 endif
 
-ifdef TOOL_NO_EXPORTS
-  DynamicFlags :=
-else
-  DynamicFlag := $(RDYNAMIC)
-endif
-
 # Adjust linker flags for building an executable
 ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+  ifndef TOOL_NO_EXPORTS
+    LD.Flags += $(RDYNAMIC)
+  endif
   ifneq ($(HOST_OS), Darwin)
     ifdef TOOLNAME
-      LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' $(DynamicFlag)
+      LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
     endif
   else
     ifneq ($(DARWIN_MAJVERS),4)
index 0258550939afaa5a8cf0f9bd71c6d7b49528afc2..545e629cf34cc9a1afb123891d0d14144a3a937f 100644 (file)
@@ -534,21 +534,18 @@ ifndef KEEP_SYMBOLS
   Install.StripFlag += -s
 endif
 
-ifdef TOOL_NO_EXPORTS
-  DynamicFlags :=
-else
-  DynamicFlag := $(RDYNAMIC)
-endif
-
 # Adjust linker flags for building an executable
 ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
+  ifndef TOOL_NO_EXPORTS
+    LD.Flags += $(RDYNAMIC)
+  endif
 ifneq ($(HOST_OS), Darwin)
 ifdef TOOLNAME
   LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib'
   ifdef EXAMPLE_TOOL
-    LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag)
+    LD.Flags += $(RPATH) -Wl,$(ExmplDir)
   else
-    LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag)
+    LD.Flags += $(RPATH) -Wl,$(ToolDir)
   endif
 endif
 else