Skip to content

Commit

Permalink
Build with the $RDYNAMIC flag on Darwin as well as other platforms.
Browse files Browse the repository at this point in the history
Part of <rdar://problem/14620988>

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187710 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
bob-wilson committed Aug 4, 2013
1 parent 75311b7 commit 0cffe07
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 15 deletions.
11 changes: 4 additions & 7 deletions Makefile.rules
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
13 changes: 5 additions & 8 deletions projects/sample/Makefile.llvm.rules
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0cffe07

Please sign in to comment.