[llvm-dev] Question on building dependent component against LLVM built with LLVM_BUILD_LLVM_DYLIB=ON
Rogozhkin, Dmitry V via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 22 15:47:13 PDT 2019
Hi,
I was trying to build Intel OpenCL open source stack consisting of:
* https://github.com/KhronosGroup/SPIRV-LLVM-Translator
* https://github.com/intel/opencl-clang
* https://github.com/intel/intel-graphics-compiler
* https://github.com/intel/compute-runtime ("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
LLVM:
1. cmake ... -> produces .a files -> NEO build pass
2. cmake -DLLVM_BUILD_LLVM_DYLIB=ON ... -> produces .a files + .so ->
NEO build fails
3. cmake -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON ... ->
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 libLLVM-8.so. As a result I got something
linked/initialized twice and got runtime error:
"Two passes with the same argument (-domtree) attempted to be
registered!"
Detailed discussion is here: https://github.com/intel/opencl-clang/pull
/53#issuecomment-475802206
Question:
---------
Is that by intent that "all" components list contains both .a and
libLLVM-8.so and we need to handle this on our project level? or this
is a bug in LLVM which needs to be fixed?
Thank you,
Dmitry.
More information about the llvm-dev
mailing list