adding readability-identifier-naming to llvm clang-tidy configuration.
[oota-llvm.git] / tools / lto / Makefile
1 ##===- tools/lto/Makefile ----------------------------------*- Makefile -*-===##
2
3 #                     The LLVM Compiler Infrastructure
4 #
5 # This file is distributed under the University of Illinois Open Source
6 # License. See LICENSE.TXT for details.
7
8 ##===----------------------------------------------------------------------===##
9
10 LEVEL := ../..
11 LIBRARYNAME := LTO
12 LINK_COMPONENTS := all-targets core lto mc mcdisassembler support
13 LINK_LIBS_IN_SHARED := 1
14 SHARED_LIBRARY := 1
15
16 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/lto.exports
17
18 include $(LEVEL)/Makefile.common
19
20 ifeq ($(HOST_OS),Darwin)
21     # Special hack to allow libLTO to have an offset version number.
22     ifdef LLVM_LTO_VERSION_OFFSET
23         LTO_LIBRARY_VERSION := $(shell expr $(LLVM_SUBMIT_VERSION) + \
24                                             $(LLVM_LTO_VERSION_OFFSET))
25     else
26         LTO_LIBRARY_VERSION := $(LLVM_SUBMIT_VERSION)
27     endif
28
29     # set dylib internal version number to llvmCore submission number
30     ifdef LLVM_SUBMIT_VERSION
31         LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \
32                         -Wl,$(LTO_LIBRARY_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
33                         -Wl,-compatibility_version -Wl,1
34     endif
35
36     # If we're doing an Apple-style build, add the LTO object path.
37     ifeq ($(RC_XBS),YES)
38        TempFile        := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/llvm-lto.XXXXXX)
39        LLVMLibsOptions := $(LLVMLibsOptions) \
40                           -Wl,-object_path_lto -Wl,$(TempFile)
41     endif
42 endif