2006-11-17 03:32:33 +00:00
|
|
|
##===- runtime/libprofile/Makefile -------------------------*- Makefile -*-===##
|
2010-09-03 15:42:45 +00:00
|
|
|
#
|
2006-11-17 03:32:33 +00:00
|
|
|
# The LLVM Compiler Infrastructure
|
|
|
|
#
|
2007-12-29 20:11:13 +00:00
|
|
|
# This file is distributed under the University of Illinois Open Source
|
|
|
|
# License. See LICENSE.TXT for details.
|
2010-09-03 15:42:45 +00:00
|
|
|
#
|
2006-11-17 03:32:33 +00:00
|
|
|
##===----------------------------------------------------------------------===##
|
|
|
|
|
|
|
|
LEVEL = ../..
|
2009-08-28 16:13:45 +00:00
|
|
|
include $(LEVEL)/Makefile.config
|
|
|
|
|
2010-02-23 10:28:06 +00:00
|
|
|
ifneq ($(strip $(LLVMCC)),)
|
2006-11-17 03:32:33 +00:00
|
|
|
BYTECODE_LIBRARY = 1
|
2009-08-20 05:12:55 +00:00
|
|
|
endif
|
2006-11-17 03:32:33 +00:00
|
|
|
LIBRARYNAME = profile_rt
|
2011-04-29 02:12:06 +00:00
|
|
|
LINK_LIBS_IN_SHARED = 1
|
|
|
|
SHARED_LIBRARY = 1
|
2010-09-03 15:42:45 +00:00
|
|
|
EXTRA_DIST = libprofile.exports
|
|
|
|
EXPORTED_SYMBOL_FILE = $(PROJ_SRC_DIR)/libprofile.exports
|
2006-11-17 03:32:33 +00:00
|
|
|
|
2011-07-19 23:33:42 +00:00
|
|
|
# Build and install this archive.
|
|
|
|
BUILD_ARCHIVE = 1
|
|
|
|
override NO_INSTALL_ARCHIVES =
|
|
|
|
|
2006-11-17 03:32:33 +00:00
|
|
|
include $(LEVEL)/Makefile.common
|
2011-06-13 20:14:37 +00:00
|
|
|
|
|
|
|
ifeq ($(HOST_OS),Darwin)
|
|
|
|
# Special hack to allow libprofile_rt to have an offset version number.
|
2011-06-15 04:56:13 +00:00
|
|
|
PROFILE_RT_LIBRARY_VERSION := $(LLVM_SUBMIT_VERSION)
|
2011-06-13 20:14:37 +00:00
|
|
|
|
|
|
|
# Set dylib internal version number to llvmCore submission number.
|
|
|
|
ifdef LLVM_SUBMIT_VERSION
|
|
|
|
LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \
|
2011-06-15 04:56:13 +00:00
|
|
|
-Wl,$(PROFILE_RT_LIBRARY_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
|
2011-06-13 20:14:37 +00:00
|
|
|
-Wl,-compatibility_version -Wl,1
|
|
|
|
endif
|
|
|
|
# Extra options to override libtool defaults.
|
|
|
|
LLVMLibsOptions := $(LLVMLibsOptions) \
|
|
|
|
-Wl,-dead_strip \
|
|
|
|
-Wl,-seg1addr -Wl,0xE0000000
|
|
|
|
|
|
|
|
# Mac OS X 10.4 and earlier tools do not allow a second -install_name on
|
|
|
|
# command line.
|
|
|
|
DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
|
|
|
|
ifneq ($(DARWIN_VERS),8)
|
2012-10-03 23:52:10 +00:00
|
|
|
LLVMLibsOptions := $(LLVMLibsOptions) \
|
2011-06-13 20:14:37 +00:00
|
|
|
-Wl,-install_name \
|
|
|
|
-Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
|
|
|
|
endif
|
2012-10-03 23:52:10 +00:00
|
|
|
|
|
|
|
# If we're doing an Apple-style build, add the LTO object path.
|
|
|
|
ifeq ($(RC_BUILDIT),YES)
|
2012-10-10 05:29:15 +00:00
|
|
|
TempFile := $(shell mkdir -p ${OBJROOT}/dSYMs ; mktemp ${OBJROOT}/dSYMs/profile_rt-lto.XXXXXX)
|
2012-10-03 23:52:10 +00:00
|
|
|
LLVMLibsOptions := $(LLVMLibsOptions) \
|
|
|
|
-Wl,-object_path_lto -Wl,$(TempFile)
|
|
|
|
endif
|
2011-06-13 20:14:37 +00:00
|
|
|
endif
|