Open for-just-we opened 1 year ago
Did you build LLVM as shared library? If not, either do that or you may try turning of dynamic linking.
Did you build LLVM as shared library? If not, either do that or you may try turning of dynamic linking.
It seems I did not add LLVM_BUILD_LLVM_DYLIB
when build LLVM, is dynamic linking the default building mode of dg ? And if I want to build dg static link to LLVM, what should I do? Simply change LLVM_LINK_DYLIB
to OFF
?
is dynamic linking the default building mode of dg ? And if I want to build dg static link to LLVM, what should I do? Simply change LLVM_LINK_DYLIB to OFF?
The answer is "yes" for both questions ;)
questions
Thank you very much, I can build it successfully on my Ubuntu virtual machine. But there is a new problem, when I try to build it in the same way on MacOS + m2 (arm64 arch). There is always error : Undefined symbols for architecture arm64: llvm::Constant::get xxxx
.
It seems dg could not successfully link to LLVM when statically build. Should I modify CMakelist.txt
?
Should I modify CMakelist.txt?
I vaguely remember that there was some kind of this problem when statically linking on MacOS. If you know how to fix that, feel free to goo ahead and do it. You can also send a PR.
Should I modify CMakelist.txt?
I vaguely remember that there was some kind of this problem when statically linking on MacOS. If you know how to fix that, feel free to goo ahead and do it. You can also send a PR.
Ok, I will try, so could I first assume there would be no problem dynamically linking to LLVM on MacOS?
Environment is:
LLVM 11.0.0 (the root dir of LLVM project is set in user environment variable)
SVF-2.3
dg-master
CMake message is:
build process is:
It seems that dg could not link to LLVM, the default linking mode is dynamic link, and variable ${llvm} is set to
LLVM
. Is there any problems in here? How could I fix this?