[llvm-commits] [llvm] r166220 - /llvm/trunk/unittests/ExecutionEngine/JIT/Makefile

Bob Wilson bob.wilson at apple.com
Thu Oct 18 13:25:36 PDT 2012


Author: bwilson
Date: Thu Oct 18 15:25:36 2012
New Revision: 166220

URL: http://llvm.org/viewvc/llvm-project?rev=166220&view=rev
Log:
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.

Modified:
    llvm/trunk/unittests/ExecutionEngine/JIT/Makefile

Modified: llvm/trunk/unittests/ExecutionEngine/JIT/Makefile
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/ExecutionEngine/JIT/Makefile?rev=166220&r1=166219&r2=166220&view=diff
==============================================================================
--- llvm/trunk/unittests/ExecutionEngine/JIT/Makefile (original)
+++ llvm/trunk/unittests/ExecutionEngine/JIT/Makefile Thu Oct 18 15:25:36 2012
@@ -35,8 +35,15 @@
   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 $< > $@
+





More information about the llvm-commits mailing list