Tips for building with LLVM_LINK_LLVM_DYLIB=ON


We've been having trouble with some strange lldb failures when building lldb
with -DLLVM_LINK_LLVM_DYLIB=ON. For example, this command segfaults
with -DLLVM_LINK_LLVM_DYLIB=ON but not if we omit that option:

echo "int main(void) { return 0; }" | gcc -x c -g - && \
   lldb -b a.out -o 'b main' -o 'r' -o 'expr printf("hello")'

Does anyone have a working LLVM_LINK_LLVM_DYLIB=ON build and if so,
could you share the cmake flags you are using?

These are the flags that I used:



Hi everyone,

I've filed with a script
that produces an LLDB build in the failing configuration and uses it
to run a simple test case. Assuming all dependencies for
Clang/LLVM/LLDB are installed, reproducing the bug should be as simple
as executing the build script.

This seems like a fairly nasty bug (it looks some sort of memory
corruption) that effectively breaks the -DLLVM_LINK_LLVM_DYLIB=ON
build on Linux.

Any help/hints/ideas welcome :slight_smile: