From 9fcf5455756412251fa285372e91728bd42013c6 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Sun, 4 Aug 2013 22:06:11 +0000 Subject: [PATCH] Build with the $RDYNAMIC flag on Darwin as well as other platforms. Part of llvm-svn: 187710 --- llvm/Makefile.rules | 11 ++++------- llvm/projects/sample/Makefile.llvm.rules | 13 +++++-------- 2 files changed, 9 insertions(+), 15 deletions(-) diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index ab31808..735cbac 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -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) diff --git a/llvm/projects/sample/Makefile.llvm.rules b/llvm/projects/sample/Makefile.llvm.rules index 0258550..545e629 100644 --- a/llvm/projects/sample/Makefile.llvm.rules +++ b/llvm/projects/sample/Makefile.llvm.rules @@ -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 -- 2.7.4