aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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