...
https://reviews.llvm.org/D92515 bumped llvm’s required MSVC version, ironically meaning that clang-cl version 12 and earlier can’t build it. That’s why we need the “
-fms-compatibility-version
" flag to have clang-cl pretend to be a newer MSVC. You don’t need to add-fms-compatibility-version
flag for clang-cl version 13 and later.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.
We set LLVM_DEFAULT_TARGET_TRIPLE manually because the prompt we use is an x86 32 bit host prompt. There is no arm64 to arm64 prompt, so cmake detects the host/default target triple “correctly” but it’s not what we really want.
...
Windows Defender likes to scan new files, including those that tests create. Which can change their last accessed times. There’s at least one test known to fail because of this, “LLVM :: ThinLTO/X86/cache.ll”. To exclude the folder follow https://support.microsoft.com/en-us/windows/add-an-exclusion-to-windows-security-811816c0-4dfd-af4a-47e4-c301afe13b26 and add “<llvm-build-dir>/test”. (you shouldn’t need to restart defender or the machine, it takes effect automatically)
Install LLDB API and testsuite dependencies
Install GNUWin32 for make and coreutils. LLDB tests depend on make and some of the coreutils for running API tests. Install it using standard install as 32bit x86 emulated executable and add install location to PATH.
Install native Python. LLDB API requires native python library. Here is a link to a unofficial build of native python installer for WoA.
Install SWIG 3 or later. LLDB requires swig to generate Python bindings. Install SWIG via x86 emulated installer and add to PATH.