diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-10-05 00:22:46 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-10-05 00:22:46 +0000 |
commit | 0a0311759babb267c087482bfde9614544c51e0d (patch) | |
tree | 1450b1d66dae020550b6324f5b22368e36f19ebe /Makefile.rules | |
parent | 5b0f1b37639d57dec72972fe445880a8a99d8674 (diff) |
Use -object_path_lto when linking executables if building Apple style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165282 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/Makefile.rules b/Makefile.rules index 030955b690..a52bb8029d 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -631,19 +631,23 @@ endif # Adjust linker flags for building an executable ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) -ifneq ($(HOST_OS), Darwin) -ifdef TOOLNAME - LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' - ifdef EXAMPLE_TOOL - LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag) - else - LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag) + ifneq ($(HOST_OS), Darwin) + ifdef TOOLNAME + LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' + ifdef EXAMPLE_TOOL + LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(DynamicFlag) + else + LD.Flags += $(RPATH) -Wl,$(ToolDir) $(DynamicFlag) + endif endif -endif else -ifneq ($(DARWIN_MAJVERS),4) - LD.Flags += $(RPATH) -Wl,@executable_path/../lib -endif + ifneq ($(DARWIN_MAJVERS),4) + LD.Flags += $(RPATH) -Wl,@executable_path/../lib + endif + ifeq ($(RC_BUILDIT),YES) + TempFile := $(shell mktemp ${OBJROOT}/llvm-lto.XXXXXX) + LD.Flags += -Wl,-object_path_lto -Wl,$(TempFile) + endif endif endif |