]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - unittests/ExecutionEngine/JIT/Makefile
Vendor import of llvm RELEASE_350/final tag r216957 (effectively, 3.5.0 release):
[FreeBSD/FreeBSD.git] / unittests / ExecutionEngine / JIT / Makefile
1 ##===- unittests/ExecutionEngine/JIT/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 TESTNAME = JIT
12 LINK_COMPONENTS := asmparser bitreader bitwriter jit native
13
14 # The JIT tests need to dlopen things.
15 NO_DEAD_STRIP := 1
16
17 include $(LEVEL)/Makefile.config
18
19 SOURCES := JITEventListenerTest.cpp JITMemoryManagerTest.cpp JITTest.cpp MultiJITTest.cpp
20
21
22 ifeq ($(USE_INTEL_JITEVENTS), 1)
23   # Build the Intel JIT Events interface tests
24   SOURCES += IntelJITEventListenerTest.cpp
25
26   # Add the Intel JIT Events include directory
27   CPPFLAGS += -I$(INTEL_JITEVENTS_INCDIR)
28
29   # Link against the LLVM Intel JIT Evens interface library
30   LINK_COMPONENTS += debuginfo inteljitevents object
31 endif
32
33 ifeq ($(USE_OPROFILE), 1)
34   # Build the OProfile JIT interface tests
35   SOURCES += OProfileJITEventListenerTest.cpp
36
37   # Link against the LLVM oprofile interface library
38   LINK_COMPONENTS += oprofilejit
39 endif
40
41 EXPORTED_SYMBOL_FILE = $(PROJ_OBJ_DIR)/JITTests.exports
42
43 include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
44
45 # Permit these tests to use the JIT's symbolic lookup.
46 LD.Flags += $(RDYNAMIC)
47
48 # Symbol exports are necessary (at least for now) when building with LTO.
49 $(LLVMUnitTestExe): $(NativeExportsFile)
50 $(PROJ_OBJ_DIR)/JITTests.exports: $(PROJ_SRC_DIR)/JITTests.def $(PROJ_OBJ_DIR)/.dir
51         tail -n +2 $< > $@
52