Silence -Wunused-variable in release builds.
[llvm/stm8.git] / runtime / libprofile / Makefile
blobcf31e46949b150ce1a99301f9fb79b4b02b5a9d9
1 ##===- runtime/libprofile/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 ##===----------------------------------------------------------------------===##
10 LEVEL = ../..
11 include $(LEVEL)/Makefile.config
13 ifneq ($(strip $(LLVMCC)),)
14 BYTECODE_LIBRARY = 1
15 endif
16 LIBRARYNAME = profile_rt
17 LINK_LIBS_IN_SHARED = 1
18 SHARED_LIBRARY = 1
19 EXTRA_DIST = libprofile.exports
20 EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libprofile.exports
22 include $(LEVEL)/Makefile.common
24 ifeq ($(HOST_OS),Darwin)
25 # Special hack to allow libprofile_rt to have an offset version number.
26 PROFILE_RT_LIBRARY_VERSION := $(LLVM_SUBMIT_VERSION)
28 # Set dylib internal version number to llvmCore submission number.
29 ifdef LLVM_SUBMIT_VERSION
30 LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \
31 -Wl,$(PROFILE_RT_LIBRARY_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
32 -Wl,-compatibility_version -Wl,1
33 endif
34 # Extra options to override libtool defaults.
35 LLVMLibsOptions := $(LLVMLibsOptions) \
36 -Wl,-dead_strip \
37 -Wl,-seg1addr -Wl,0xE0000000
39 # Mac OS X 10.4 and earlier tools do not allow a second -install_name on
40 # command line.
41 DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
42 ifneq ($(DARWIN_VERS),8)
43 LLVMLibsOptions := $(LLVMLibsOptions) \
44 -Wl,-install_name \
45 -Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
46 endif
47 endif