Home | History | Annotate | Download | only in JIT
      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 include $(LEVEL)/Makefile.config
     15 
     16 SOURCES := JITEventListenerTest.cpp JITMemoryManagerTest.cpp JITTest.cpp MultiJITTest.cpp
     17 
     18 
     19 ifeq ($(USE_INTEL_JITEVENTS), 1)
     20   # Build the Intel JIT Events interface tests
     21   SOURCES += IntelJITEventListenerTest.cpp
     22 
     23   # Add the Intel JIT Events include directory
     24   CPPFLAGS += -I$(INTEL_JITEVENTS_INCDIR)
     25 
     26   # Link against the LLVM Intel JIT Evens interface library
     27   LINK_COMPONENTS += debuginfo inteljitevents object
     28 endif
     29 
     30 ifeq ($(USE_OPROFILE), 1)
     31   # Build the OProfile JIT interface tests
     32   SOURCES += OProfileJITEventListenerTest.cpp
     33 
     34   # Link against the LLVM oprofile interface library
     35   LINK_COMPONENTS += oprofilejit
     36 endif
     37 
     38 EXPORTED_SYMBOL_FILE = $(PROJ_OBJ_DIR)/JITTests.exports
     39 
     40 include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
     41 
     42 # Permit these tests to use the JIT's symbolic lookup.
     43 LD.Flags += $(RDYNAMIC)
     44 
     45 # Symbol exports are necessary (at least for now) when building with LTO.
     46 $(LLVMUnitTestExe): $(NativeExportsFile)
     47 $(PROJ_OBJ_DIR)/JITTests.exports: $(PROJ_SRC_DIR)/JITTests.def $(PROJ_OBJ_DIR)/.dir
     48 	tail -n +2 $< > $@
     49 
     50