From 21e71e948b80535a6299ef98df05ea518b93d6f8 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 8 Dec 2010 01:48:05 +0000 Subject: [PATCH] build: Don't force -flat_namespace or '-undefined suppress' on unsuspecting users of LLVM makefiles, these options really shouldn't be used on Darwin. llvm-svn: 121223 --- llvm/Makefile.rules | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules index 86730e713992..6d2d694f624e 100644 --- a/llvm/Makefile.rules +++ b/llvm/Makefile.rules @@ -507,8 +507,8 @@ ifeq ($(HOST_OS),Darwin) # Get "4" out of 10.4 for later pieces in the makefile. DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/') - SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined,suppress \ - -dynamiclib + LoadableModuleOptions := -Wl,-flat_namespace -Wl,-undefined,suppress + SharedLinkOptions := -dynamiclib ifneq ($(ARCH),ARM) SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION) endif @@ -1113,6 +1113,7 @@ endif ifdef LINK_LIBS_IN_SHARED ifdef LOADABLE_MODULE SharedLibKindMessage := "Loadable Module" +SharedLinkOptions := $(LoadableModuleOptions) $(SharedLinkOptions) else SharedLibKindMessage := "Shared Library" endif