diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-03 23:52:10 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-03 23:52:10 +0000 |
commit | 10181ae49c25e22267ea3d539dd53e07d5e45528 (patch) | |
tree | 5f76fc30a19949beaf5602227716a3ed43007e50 /runtime | |
parent | 471b917b265c7c657233d9b8632af344a7d6a43a (diff) | |
download | external_llvm-10181ae49c25e22267ea3d539dd53e07d5e45528.zip external_llvm-10181ae49c25e22267ea3d539dd53e07d5e45528.tar.gz external_llvm-10181ae49c25e22267ea3d539dd53e07d5e45528.tar.bz2 |
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')
-rw-r--r-- | runtime/libprofile/Makefile | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/runtime/libprofile/Makefile b/runtime/libprofile/Makefile index d851149..1ea0895 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 |