the various ConstantExpr::get*Ty methods existed to work with issues around
[llvm/stm8.git] / tools / lto / Makefile
blob46925e77de2cc73fd3a9e53e823369a667b4f488
1 ##===- tools/lto/Makefile ----------------------------------*- Makefile -*-===##
2 #
3 # The LLVM Compiler Infrastructure
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
7 #
8 ##===----------------------------------------------------------------------===##
10 LEVEL = ../..
11 LIBRARYNAME = LTO
13 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/lto.exports
15 # Include this here so we can get the configuration of the targets
16 # that have been configured for construction. We have to do this
17 # early so we can set up LINK_COMPONENTS before including Makefile.rules
18 include $(LEVEL)/Makefile.config
20 LINK_LIBS_IN_SHARED = 1
21 SHARED_LIBRARY = 1
23 LINK_COMPONENTS := $(TARGETS_TO_BUILD) ipo scalaropts linker bitreader \
24 bitwriter mcdisassembler
26 include $(LEVEL)/Makefile.common
28 ifdef LLVM_VERSION_INFO
29 CXX.Flags += -DLLVM_VERSION_INFO='"$(LLVM_VERSION_INFO)"'
30 endif
32 ifeq ($(HOST_OS),Darwin)
33 # Special hack to allow libLTO to have an offset version number.
34 ifdef LLVM_LTO_VERSION_OFFSET
35 LTO_LIBRARY_VERSION := $(shell expr $(LLVM_SUBMIT_VERSION) + \
36 $(LLVM_LTO_VERSION_OFFSET))
37 else
38 LTO_LIBRARY_VERSION := $(LLVM_SUBMIT_VERSION)
39 endif
41 # set dylib internal version number to llvmCore submission number
42 ifdef LLVM_SUBMIT_VERSION
43 LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \
44 -Wl,$(LTO_LIBRARY_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
45 -Wl,-compatibility_version -Wl,1
46 endif
47 # extra options to override libtool defaults
48 LLVMLibsOptions := $(LLVMLibsOptions) \
49 -Wl,-dead_strip \
50 -Wl,-seg1addr -Wl,0xE0000000
52 # Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
53 DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
54 ifneq ($(DARWIN_VERS),8)
55 LLVMLibsOptions := $(LLVMLibsOptions) \
56 -Wl,-install_name \
57 -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
58 endif
59 endif