summaryrefslogtreecommitdiff
path: root/tools/lto/Makefile
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-07-16 01:41:38 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-07-16 01:41:38 +0000
commit48bf8f0c3ade7f55dedb6d0c2142f1e064a95668 (patch)
treeb3e5894cde5db43220c49aab5606f8814b35cc4d /tools/lto/Makefile
parentde309a8b529bb978cea072680738147e04d21e70 (diff)
downloadllvm-48bf8f0c3ade7f55dedb6d0c2142f1e064a95668.tar.gz
llvm-48bf8f0c3ade7f55dedb6d0c2142f1e064a95668.tar.bz2
llvm-48bf8f0c3ade7f55dedb6d0c2142f1e064a95668.tar.xz
build/Darwin: Add an LLVM_LTO_VERSION_OFFSET make variable to allow offsetting
the libLTO library version from the actual build version. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108495 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/Makefile')
-rw-r--r--tools/lto/Makefile10
1 files changed, 9 insertions, 1 deletions
diff --git a/tools/lto/Makefile b/tools/lto/Makefile
index 8d57333f9c..f3fb79e682 100644
--- a/tools/lto/Makefile
+++ b/tools/lto/Makefile
@@ -25,10 +25,18 @@ LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts linker bitreader bitwriter
include $(LEVEL)/Makefile.common
ifeq ($(HOST_OS),Darwin)
+ # Special hack to allow libLTO to have an offset version number.
+ ifdef LLVM_LTO_VERSION_OFFSET
+ LTO_LIBRARY_VERSION := $(shell expr $(LLVM_SUBMIT_VERSION) + \
+ $(LLVM_LTO_VERSION_OFFSET))
+ else
+ LTO_LIBRARY_VERSION := $(LLVM_SUBMIT_VERSION)
+ endif
+
# set dylib internal version number to llvmCore submission number
ifdef LLVM_SUBMIT_VERSION
LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \
- -Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
+ -Wl,$(LTO_LIBRARY_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
-Wl,-compatibility_version -Wl,1
endif
# extra options to override libtool defaults