Add an explicit -object_path_lto flag during linking with a uniquified temporary

file name if building Apple-style.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165185 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Bill Wendling 2012-10-03 23:52:10 +00:00
parent 471b917b26
commit 10181ae49c
2 changed files with 15 additions and 1 deletions

View File

@ -44,8 +44,15 @@ ifeq ($(HOST_OS),Darwin)
# command line.
DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
ifneq ($(DARWIN_VERS),8)
LLVMLibsOptions := $(LLVMLibsOptions) \
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_BUILDIT),YES)
TempFile = $(shell mktemp ${OBJROOT}/profile_rt-lto.XXXXXX)
LLVMLibsOptions := $(LLVMLibsOptions) \
-Wl,-object_path_lto -Wl,$(TempFile)
endif
endif

View File

@ -49,4 +49,11 @@ ifeq ($(HOST_OS),Darwin)
-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_BUILDIT),YES)
TempFile = $(shell mktemp ${OBJROOT}/llvm-lto.XXXXXX)
LLVMLibsOptions := $(LLVMLibsOptions) \
-Wl,-object_path_lto -Wl,$(TempFile)
endif
endif