aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-10-03 23:49:57 +0000
committerBill Wendling <isanbard@gmail.com>2012-10-03 23:49:57 +0000
commit731a26202db4251ce9f98e64bed8ee257c46eb61 (patch)
treef75c46f533c9d7f2716c21a850afc533add3c06a
parent5904c9c74ed3972af2003927c6df3fbb1e6131e3 (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/cfe/trunk@165184 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--tools/libclang/Makefile6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/libclang/Makefile b/tools/libclang/Makefile
index cefd9ba6df..5fdfd0ebb5 100644
--- a/tools/libclang/Makefile
+++ b/tools/libclang/Makefile
@@ -52,4 +52,10 @@ ifeq ($(HOST_OS),Darwin)
LLVMLibsOptions += -Wl,-install_name \
-Wl,"@rpath/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}/clang-lto.XXXXXX)
+ LLVMLibsOptions += -Wl,-object_path_lto -Wl,$(TempFile)
+ endif
endif