mirror of
https://git.freebsd.org/ports.git
synced 2025-04-29 01:56:37 -04:00
developers, not for actual LLVM-based products), and ``void dump() const'' sprinkled across LLVM header files are just prototypes. However, this is not the case with ``$localbase/llvm$ver/include/llvm/Support/CFGUpdate.h'', where it contains some actual code: #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) LLVM_DUMP_METHOD void dump() const { print(dbgs()); } #endif This, in turn, results in the linker failure due to "undefined reference to llvm::cfg::Update<llvm::BasicBlock*>::dump() const". Avoid this by defining -DNDEBUG when compiling two files which end up having a reference to dump(). This is a prerequisite to enable building with LLVM backend.
13 lines
600 B
Text
13 lines
600 B
Text
--- src/SeExpr2/CMakeLists.txt.orig 2019-10-03 17:15:38 UTC
|
|
+++ src/SeExpr2/CMakeLists.txt
|
|
@@ -19,6 +19,10 @@ file(GLOB to_remove "ExprLLVMCodeGeneration.cpp")
|
|
list(REMOVE_ITEM io_cpp ${to_remove})
|
|
|
|
set_source_files_properties("ExprBuiltins.cpp" PROPERTIES COMPILE_DEFINITIONS "__STDC_LIMIT_MACROS")
|
|
+# XXX: avoid undefref to llvm::cfg::Update<llvm::BasicBlock*>::dump() const
|
|
+set_source_files_properties(
|
|
+ Expression.cpp ExprLLVMCodeGeneration.cpp
|
|
+ PROPERTIES COMPILE_DEFINITIONS NDEBUG)
|
|
|
|
# Uncomment below to print debug messages / performance stats
|
|
#add_definitions(-DSEEXPR_DEBUG)
|