1 ##===- tools/lto/Makefile ----------------------------------*- Makefile -*-===##
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
8 ##===----------------------------------------------------------------------===##
13 # Include this here so we can get the configuration of the targets
14 # that have been configured for construction. We have to do this
15 # early so we can set up LINK_COMPONENTS before including Makefile.rules
16 include $(LEVEL
)/Makefile.config
18 LINK_LIBS_IN_SHARED
= 1
21 DONT_BUILD_RELINKED
= 1
26 LINK_COMPONENTS
:= $(TARGETS_TO_BUILD
) ipo scalaropts linker bitreader bitwriter
28 include $(LEVEL
)/Makefile.common
31 # set dylib internal version number to llvmCore submission number
32 ifdef LLVM_SUBMIT_VERSION
33 LLVMLibsOptions
:= $(LLVMLibsOptions
) -Wl
,-current_version \
34 -Wl
,$(LLVM_SUBMIT_VERSION
).
$(LLVM_SUBMIT_SUBVERSION
) \
35 -Wl
,-compatibility_version
-Wl
,1
37 # extra options to override libtool defaults
38 LLVMLibsOptions
:= $(LLVMLibsOptions
) \
39 -no-undefined
-avoid-version \
40 -Wl
,-exported_symbols_list
-Wl
,$(PROJ_SRC_DIR
)/lto.exports \
42 -Wl
,-seg1addr
-Wl
,0xE0000000
44 # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
45 DARWIN_VERS
:= $(shell echo
$(TARGET_TRIPLE
) | sed
's/.*darwin\([0-9]*\).*/\1/')
46 ifneq ($(DARWIN_VERS
),8)
47 LLVMLibsOptions
:= $(LLVMLibsOptions
) \
49 -Wl
,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"