Question on building dependent component against LLVM built with LLVM_BUILD_LLVM_DYLIB=ON


I was trying to build Intel OpenCL open source stack consisting of:
* GitHub - intel/opencl-clang
* ("NEO" driver)

against LLVM-8 and met with the runtime issue during the build of the
NEO driver (last in the list above). I was trying 3 variants to build
1. cmake ... -> produces .a files -> NEO build pass
2. cmake -DLLVM_BUILD_LLVM_DYLIB=ON ... -> produces .a files + .so ->
NEO build fails
produces .a files + .so -> NEO build pass

So, I have issues when I build LLVM with only LLVM_BUILD_LLVM_DYLIB=ON
and without LLVM_LINK_LLVM_DYLIB=ON. Issues seem to happen because LLVM
generated the list of "all" components which contains both all .s
static libraries and As a result I got something
linked/initialized twice and got runtime error:

"Two passes with the same argument (-domtree) attempted to be

Detailed discussion is here: