summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--Makefile.rules2
-rw-r--r--tools/llvm-shlib/Makefile8
-rw-r--r--tools/lto/Makefile8
4 files changed, 3 insertions, 17 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72901c8876..ab93503f28 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -443,7 +443,7 @@ set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib )
set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
if (APPLE)
- set(CMAKE_INSTALL_NAME_DIR "@executable_path/../lib")
+ set(CMAKE_INSTALL_NAME_DIR "@rpath")
set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
else(UNIX)
if(NOT DEFINED CMAKE_INSTALL_RPATH)
diff --git a/Makefile.rules b/Makefile.rules
index d668b23afb..3f1c2afe73 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -589,6 +589,8 @@ ifdef SHARED_LIBRARY
ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
ifneq ($(HOST_OS),Darwin)
LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
+else
+ LD.Flags += -Wl,-install_name -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
endif
endif
endif
diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile
index 317da51720..92ddfdb763 100644
--- a/tools/llvm-shlib/Makefile
+++ b/tools/llvm-shlib/Makefile
@@ -49,14 +49,6 @@ ifeq ($(HOST_OS),Darwin)
endif
# Include everything from the .a's into the shared library.
LLVMLibsOptions := $(LLVMLibsOptions) -all_load
-
- # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
- DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
- ifneq ($(DARWIN_VERS),8)
- LLVMLibsOptions := $(LLVMLibsOptions) \
- -Wl,-install_name \
- -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
- endif
endif
ifeq ($(HOST_OS), $(filter $(HOST_OS), DragonFly Linux FreeBSD GNU/kFreeBSD OpenBSD GNU Bitrig))
diff --git a/tools/lto/Makefile b/tools/lto/Makefile
index 1cfff028f6..a4fe9ac77c 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -37,14 +37,6 @@ ifeq ($(HOST_OS),Darwin)
-Wl,-compatibility_version -Wl,1
endif
- # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
- DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
- ifneq ($(DARWIN_VERS),8)
- LLVMLibsOptions := $(LLVMLibsOptions) \
- -Wl,-install_name \
- -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
- endif
-
# If we're doing an Apple-style build, add the LTO object path.
ifeq ($(RC_XBS),YES)
TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX)