HomeFreeBSD

Our LLVM packages typically built without dump support (which is meant for

Description

Our LLVM packages typically built without dump support (which is meant for
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.

Details

Provenance
danfeAuthored on
Parents
rP526265: lang/rust: add the WASM option
Branches
Unknown
Tags
Unknown