from #llvm IRC:
<andrewrk> does llvm 7 as a .so have some kind of new initialization
requirement? I'm getting a segfault in llvm::DIBuilder::createFile
(with valid non-null parameters), when linking my frontend against
llvm-7.so but not when linking against llvm .a libraries
<d0k> we have an ABI bug in LLVM 7 when the .so is built with gcc
but your program is build with clang. I'm sorry for that.