aboutsummaryrefslogtreecommitdiffstats
path: root/unittests/ExecutionEngine/JIT
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2012-10-18 20:25:36 +0000
committerBob Wilson <bob.wilson@apple.com>2012-10-18 20:25:36 +0000
commit974b1907178f980063d4b4defefe3eb4d3d50b7b (patch)
tree32c0111519c5d0bbeb0c8081d2d33240f0ae29aa /unittests/ExecutionEngine/JIT
parent92c39cadbc04ab7318f2a67d444e38b63ad33a57 (diff)
downloadexternal_llvm-974b1907178f980063d4b4defefe3eb4d3d50b7b.zip
external_llvm-974b1907178f980063d4b4defefe3eb4d3d50b7b.tar.gz
external_llvm-974b1907178f980063d4b4defefe3eb4d3d50b7b.tar.bz2
Use an export list when building JIT unittests. <rdar://problem/12473675>
When building with LTO, the internalize pass is hiding some global symbols that are necessary for the JIT unittests. It seems like that may be a bug in LTO to do that by default, but until that gets fixed, this change makes sure that we export the necessary symbols for the tests to pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166220 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/ExecutionEngine/JIT')
-rw-r--r--unittests/ExecutionEngine/JIT/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/unittests/ExecutionEngine/JIT/Makefile b/unittests/ExecutionEngine/JIT/Makefile
index b535a6b..9e0bb9e 100644
--- a/unittests/ExecutionEngine/JIT/Makefile
+++ b/unittests/ExecutionEngine/JIT/Makefile
@@ -35,8 +35,15 @@ ifeq ($(USE_OPROFILE), 1)
LINK_COMPONENTS += oprofilejit
endif
+EXPORTED_SYMBOL_FILE = $(PROJ_OBJ_DIR)/JITTests.exports
include $(LLVM_SRC_ROOT)/unittests/Makefile.unittest
# Permit these tests to use the JIT's symbolic lookup.
LD.Flags += $(RDYNAMIC)
+
+# Symbol exports are necessary (at least for now) when building with LTO.
+$(LLVMUnitTestExe): $(NativeExportsFile)
+$(PROJ_OBJ_DIR)/JITTests.exports: $(PROJ_SRC_DIR)/JITTests.def $(PROJ_OBJ_DIR)/.dir
+ tail -n +2 $< > $@
+