...
Code Block |
---|
cmake ..\llvm-project\llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_PROJECTS="clang;lldb;lld;llvm" -DLLVM_ENABLE_ASSERTIONS=ON -DCMAKE_C_FLAGS="-fms-compatibility-version=19.14" -DCMAKE_CXX_FLAGS="-fms-compatibility-version=19.14" -DCMAKE_TRY_COMPILE_CONFIGURATION=Release -G Ninja |
Note: https://reviews.llvm.org/D92515 bumped llvm’s required MSVC version, ironically meaning that clang-cl version 12 can’t build it. That’s why we need the “ms-compatibility-version
" flag to have clang-cl pretend to be a newer MSVC.
Note: Known issue with cmake 3.21.1, it builds all try_compile/try_run as debug even if you select release mode. This is why we set “-DCMAKE_TRY_COMPILE_CONFIGURATION=Release”. Not doing so causes a try_run to fail to get error message strings, so lit defaults to Linux strings and a bunch of tests fail.
Then build as usual with ninja.
...