aboutsummaryrefslogtreecommitdiff
path: root/runtime/libprofile
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-03 23:52:10 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-03 23:52:10 +0000
commit10181ae49c25e22267ea3d539dd53e07d5e45528 (patch)
tree5f76fc30a19949beaf5602227716a3ed43007e50 /runtime/libprofile
parent471b917b265c7c657233d9b8632af344a7d6a43a (diff)
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
Diffstat (limited to 'runtime/libprofile')
-rw-r--r--runtime/libprofile/Makefile9
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/libprofile/Makefile b/runtime/libprofile/Makefile
index d8511495ce..1ea0895338 100644
--- a/runtime/libprofile/Makefile
+++ b/runtime/libprofile/Makefile
@@ -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