diff options
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 |