Hi, the llvm release build has the same thing has build a cross compiler tool, must for windows can use shared build, but some linux cross libs dons't likes shared thing, so most of modules are static linked, for coexistent cross compiler capability's.
fix for Z3 lib cmake mudule in llvm\cmake\modules\FindZ3.cmake
Changed this:
# If the dynamic check fails, we might be cross compiling: if that's the case,
# check the version in the headers, otherwise, fail with a message
if(NOT Z3_VERSION_STRING AND (CMAKE_CROSSCOMPILING AND
Z3_INCLUDE_DIR AND
EXISTS "${Z3_INCLUDE_DIR}/z3_version.h"))
# TODO: print message warning that we couldn't find a compatible lib?
To this:
# If the dynamic check fails, we might be cross compiling: if that's the case,
# check the version in the headers, otherwise, fail with a message
if(NOT Z3_VERSION_STRING AND (Z3_INCLUDE_DIR AND
EXISTS "${Z3_INCLUDE_DIR}/z3_version.h"))
# TODO: print message warning that we couldn't find a compatible lib?
Before using cmake gui we need to directly apply LLVM build config with command.
In a empty build dir: example D:\llvm_msvc_build. Open command prompt and do:
cmake -G "Visual Studio 16 2019" -A x64 -T host=x64 D:/Repos/llvm/llvm -D PYTHON_HOME=C:/Python37 -D LLVM_ENABLE_PROJECTS=llvm;clang;clang-tools-extra;compiler-rt;libcxx;libcxxabi;lld;lldb;openmp;parallel-libs;polly;debuginfo-testsAttached my trending secrets, for try and fail for optimal LLVM build release on windows with cmake & MVSC. Obviously tried to build LLVM with LLVM and most off the modules fails compiling.
All the path's folder's etc. Change-it to your things.
Use cmake gui to config the remaining modules before open compiler solution.
Try one off the build targets for minimal release.
TIP: Can use the depends to check for lld-link dependencies.
http://www.dependencywalker.com/Good luck....