Rust bootstrap fails on Windows

I wanted to make a contribution to Rust, but when I tried running the python x.py script (I've tried build src/libcore among others), I receive the following error:

thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\Remco\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.42\src\lib.rs:861:5
stack backtrace:
   0:     0x7ff6d3bd733e - backtrace::backtrace::trace_unsynchronized
                               at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.46\src\backtrace\mod.rs:66
   1:     0x7ff6d3bd733e - std::sys_common::backtrace::_print_fmt
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\sys_common\backtrace.rs:78
   2:     0x7ff6d3bd733e - std::sys_common::backtrace::_print::{{impl}}::fmt
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\sys_common\backtrace.rs:59
   3:     0x7ff6d3bf919c - core::fmt::write
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libcore\fmt\mod.rs:1076
   4:     0x7ff6d3bd13ac - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\io\mod.rs:1537
   5:     0x7ff6d3bdc85b - std::sys_common::backtrace::_print
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\sys_common\backtrace.rs:62
   6:     0x7ff6d3bdc85b - std::sys_common::backtrace::print
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\sys_common\backtrace.rs:49
   7:     0x7ff6d3bdc85b - std::panicking::default_hook::{{closure}}
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:198
   8:     0x7ff6d3bdc4a8 - std::panicking::default_hook
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:218
   9:     0x7ff6d3bdd036 - std::panicking::rust_panic_with_hook
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:486
  10:     0x7ff6d3bdcbbf - std::panicking::begin_panic_handler
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:388
  11:     0x7ff6d3bdcb2c - std::panicking::begin_panic_fmt
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:342
  12:     0x7ff6d37faffe - cmake::fail
                               at C:\Users\Remco\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.42\src\lib.rs:861
  13:     0x7ff6d37fa933 - cmake::run
                               at C:\Users\Remco\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.42\src\lib.rs:839
  14:     0x7ff6d37f7201 - cmake::Config::build
                               at C:\Users\Remco\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.42\src\lib.rs:745
  15:     0x7ff6d33f6f5e - bootstrap::native::{{impl}}::run
                               at C:\dev\src\rust\src\bootstrap\native.rs:296
  16:     0x7ff6d376417d - bootstrap::builder::Builder::ensure<bootstrap::native::Llvm>
                               at C:\dev\src\rust\src\bootstrap\builder.rs:1358
  17:     0x7ff6d35e7d19 - bootstrap::compile::rustc_cargo_env
                               at C:\dev\src\rust\src\bootstrap\compile.rs:581
  18:     0x7ff6d35e7770 - bootstrap::compile::rustc_cargo
                               at C:\dev\src\rust\src\bootstrap\compile.rs:533
  19:     0x7ff6d35e6f07 - bootstrap::compile::{{impl}}::run
                               at C:\dev\src\rust\src\bootstrap\compile.rs:504
  20:     0x7ff6d373dcd9 - bootstrap::builder::Builder::ensure<bootstrap::compile::Rustc>
                               at C:\dev\src\rust\src\bootstrap\builder.rs:1358
  21:     0x7ff6d35e9b12 - bootstrap::compile::{{impl}}::run
                               at C:\dev\src\rust\src\bootstrap\compile.rs:789
  22:     0x7ff6d37501e0 - bootstrap::builder::Builder::ensure<bootstrap::compile::Assemble>
                               at C:\dev\src\rust\src\bootstrap\builder.rs:1358
  23:     0x7ff6d33711bc - bootstrap::builder::Builder::compiler
                               at C:\dev\src\rust\src\bootstrap\builder.rs:577
  24:     0x7ff6d35e9ac7 - bootstrap::compile::{{impl}}::run
                               at C:\dev\src\rust\src\bootstrap\compile.rs:782
  25:     0x7ff6d37501e0 - bootstrap::builder::Builder::ensure<bootstrap::compile::Assemble>
                               at C:\dev\src\rust\src\bootstrap\builder.rs:1358
  26:     0x7ff6d33711bc - bootstrap::builder::Builder::compiler
                               at C:\dev\src\rust\src\bootstrap\builder.rs:577
  27:     0x7ff6d35e2faf - bootstrap::compile::{{impl}}::make_run
                               at C:\dev\src\rust\src\bootstrap\compile.rs:47
  28:     0x7ff6d336cb13 - bootstrap::builder::StepDescription::maybe_run
                               at C:\dev\src\rust\src\bootstrap\builder.rs:188
  29:     0x7ff6d336d3ed - bootstrap::builder::StepDescription::run
                               at C:\dev\src\rust\src\bootstrap\builder.rs:229
  30:     0x7ff6d337116f - bootstrap::builder::Builder::run_step_descriptions
                               at C:\dev\src\rust\src\bootstrap\builder.rs:569
  31:     0x7ff6d3371003 - bootstrap::builder::Builder::execute_cli
                               at C:\dev\src\rust\src\bootstrap\builder.rs:560
  32:     0x7ff6d31bd7ae - bootstrap::Build::build
                               at C:\dev\src\rust\src\bootstrap\lib.rs:487
  33:     0x7ff6d31b1224 - bootstrap::main
                               at C:\dev\src\rust\src\bootstrap\bin\main.rs:15
  34:     0x7ff6d31b106b - std::rt::lang_start::{{closure}}<()>
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\src\libstd\rt.rs:67
  35:     0x7ff6d3bdd236 - std::rt::lang_start_internal::{{closure}}
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\rt.rs:52
  36:     0x7ff6d3bdd236 - std::panicking::try::do_call
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:297
  37:     0x7ff6d3bdd236 - std::panicking::try
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:274
  38:     0x7ff6d3bdd236 - std::panic::catch_unwind
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panic.rs:394
  39:     0x7ff6d3bdd236 - std::rt::lang_start_internal
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\rt.rs:51
  40:     0x7ff6d31b1043 - std::rt::lang_start<()>
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\src\libstd\rt.rs:67
  41:     0x7ff6d31b12d0 - main
  42:     0x7ff6d3c00bd4 - invoke_main
                               at D:\agent\_work\8\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  43:     0x7ff6d3c00bd4 - __scrt_common_main_seh
                               at D:\agent\_work\8\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  44:     0x7ffad2eb7bd4 - BaseThreadInitThunk
  45:     0x7ffad454ce51 - RtlUserThreadStart
        finished in 81.055
failed to run: C:\dev\src\rust\build\bootstrap\debug\bootstrap build src/libcore

I'm trying to compile on Windows using Visual Studio 16 2019. I've tried running with administrator privileges but to no avail and tried both with and without the vcvars64.bat batch script. Does anyone have any other recommendations?

Do you have cmake installed ok? If not the the docs have Windows instructions.

You should never need admin to build rustc.

Yes, I have CMake installed. The CMake config runs just fine. At some point after that it seems to run the aforementioned batch script

Unfortunately the backtrace doesn't give a lot to go on. It only says that running cmake.exe failed (it returned 1) but not why. Is there any output from cmake before that?

My only other suggestion is to double check in the VS Installer that you've got the C++ Visual Studio workload installed and that it does include things like the Windows 10 SDK and the Universal CRT. But I am just wildly guessing.

Sorry. For completeness, here is the entire output log:

Updating only changed submodules
Submodules updated in 0.20 seconds
    Finished dev [unoptimized] target(s) in 0.94s
Building stage0 std artifacts (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc)
    Finished release [optimized] target(s) in 1.35s
Copying stage0 std from stage0 (x86_64-pc-windows-msvc -> x86_64-pc-windows-msvc / x86_64-pc-windows-msvc)
Building LLVM for x86_64-pc-windows-msvc
running: "cmake" "C:\\dev\\src\\rust\\src/llvm-project/llvm" "-G" "Visual Studio 16 2019" "-Thost=x64" "-Ax64" "-DLLVM_ENABLE_ASSERTIONS=OFF" "-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;Hexagon;MSP430;Mips;NVPTX;PowerPC;RISCV;Sparc;SystemZ;WebAssembly;X86" "-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR" "-DLLVM_INCLUDE_EXAMPLES=OFF" "-DLLVM_INCLUDE_TESTS=OFF" "-DLLVM_INCLUDE_DOCS=OFF" "-DLLVM_INCLUDE_BENCHMARKS=OFF" "-DWITH_POLLY=OFF" "-DLLVM_ENABLE_TERMINFO=OFF" "-DLLVM_ENABLE_LIBEDIT=OFF" "-DLLVM_ENABLE_BINDINGS=OFF" "-DLLVM_ENABLE_Z3_SOLVER=OFF" "-DLLVM_PARALLEL_COMPILE_JOBS=8" "-DLLVM_TARGET_ARCH=x86_64" "-DLLVM_DEFAULT_TARGET_TRIPLE=x86_64-pc-windows-msvc" "-DLLVM_ENABLE_ZLIB=ON" "-DLLVM_USE_CRT_DEBUG=MT" "-DLLVM_USE_CRT_RELEASE=MT" "-DLLVM_USE_CRT_RELWITHDEBINFO=MT" "-DLLVM_ENABLE_LIBXML2=OFF" "-DLLVM_VERSION_SUFFIX=-rust-dev" "-DPYTHON_EXECUTABLE=C:\\Program Files\\Python38\\python.exe" "-DCMAKE_INSTALL_MESSAGE=LAZY" "-DCMAKE_INSTALL_PREFIX=C:\\dev\\src\\rust\\build\\x86_64-pc-windows-msvc\\llvm" "-DCMAKE_C_FLAGS= -nologo -MT -Brepro" "-DCMAKE_C_FLAGS_RELEASE= -nologo -MT -Brepro" "-DCMAKE_CXX_FLAGS= -nologo -MT -Brepro" "-DCMAKE_CXX_FLAGS_RELEASE= -nologo -MT -Brepro" "-DCMAKE_BUILD_TYPE=Release"
-- Selecting Windows SDK version 10.0.17763.0 to target Windows 10.0.18363.
-- Could NOT find Z3: Found unsuitable version "0.0.0", but required is at least "4.7.1" (found Z3_LIBRARIES-NOTFOUND)
-- Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR) 
-- Native target architecture is X86
-- Threads enabled.
-- Doxygen disabled.
-- Go bindings disabled.
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH) 
-- OCaml bindings disabled.
-- LLVM host triple: x86_64-pc-windows-msvc
-- LLVM default target triple: x86_64-pc-windows-msvc
CMake Warning at cmake/modules/HandleLLVMOptions.cmake:30 (message):
  Job pooling is only available with Ninja generators.
Call Stack (most recent call first):
  CMakeLists.txt:648 (include)


-- Using Debug VC++ CRT: MT
-- Using Release VC++ CRT: MT
-- Using MinSizeRel VC++ CRT: MD
-- Using RelWithDebInfo VC++ CRT: MT
-- Using Release VC++ CRT: MT
-- Constructing LLVMBuild project information
-- LLVMHello ignored -- Loadable modules not supported on this platform.
-- Targeting AArch64
-- Targeting ARM
-- Targeting Hexagon
-- Targeting MSP430
-- Targeting Mips
-- Targeting NVPTX
-- Targeting PowerPC
-- Targeting RISCV
-- Targeting Sparc
-- Targeting SystemZ
-- Targeting WebAssembly
-- Targeting X86
-- Targeting AVR
-- BugpointPasses ignored -- Loadable modules not supported on this platform.
-- Configuring done
-- Generating done
-- Build files have been written to: C:/dev/src/rust/build/x86_64-pc-windows-msvc/llvm/build
running: "cmake" "--build" "." "--target" "install" "--config" "Release" "--"
Microsoft (R) Build Engine version 16.7.0-preview-20270-03+bee129d1b for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.

  LLVMDemangle.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMDemangle.lib
  LLVMSupport.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMSupport.lib
  LLVMBinaryFormat.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMBinaryFormat.lib
  obj.llvm-tblgen.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\utils\TableGen\obj.llvm-tblgen.dir\Release\obj.llvm-tblgen.lib
  LLVMTableGen.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMTableGen.lib
  LLVMTableGenGlobalISel.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMTableGenGlobalISel.lib
  llvm-tblgen.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\bin\llvm-tblgen.exe
  LLVMBitstreamReader.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMBitstreamReader.lib
  LLVMRemarks.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMRemarks.lib
  LLVMCore.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMCore.lib
  LLVMBitReader.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMBitReader.lib
  LLVMDebugInfoMSF.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMDebugInfoMSF.lib
  LLVMDebugInfoCodeView.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMDebugInfoCodeView.lib
  LLVMMC.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMC.lib
  LLVMMCParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMCParser.lib
  LLVMTextAPI.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMTextAPI.lib
  LLVMObject.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMObject.lib
  LLVMDebugInfoDWARF.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMDebugInfoDWARF.lib
  LLVMDebugInfoPDB.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMDebugInfoPDB.lib
  LLVMSymbolize.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMSymbolize.lib
  llvm-symbolizer.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\bin\llvm-symbolizer.exe
  LLVMAArch64Info.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMAArch64Info.lib
  LLVMAArch64Utils.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMAArch64Utils.lib
  LLVMAArch64Desc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMAArch64Desc.lib
  LLVMAArch64AsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMAArch64AsmParser.lib
  LLVMARMInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMARMInfo.lib
  LLVMARMUtils.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMARMUtils.lib
  LLVMMCDisassembler.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMCDisassembler.lib
  LLVMARMDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMARMDesc.lib
  LLVMARMAsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMARMAsmParser.lib
  LLVMAVRInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMAVRInfo.lib
  LLVMAVRDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMAVRDesc.lib
  LLVMAVRAsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMAVRAsmParser.lib
  LLVMOption.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMOption.lib
  LLVMDlltoolDriver.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMDlltoolDriver.lib
  LLVMHexagonInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMHexagonInfo.lib
  LLVMHexagonDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMHexagonDesc.lib
  LLVMHexagonAsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMHexagonAsmParser.lib
  LLVMLibDriver.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMLibDriver.lib
  LLVMMSP430Info.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMSP430Info.lib
  LLVMMSP430Desc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMSP430Desc.lib
  LLVMMSP430AsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMSP430AsmParser.lib
  LLVMMipsInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMipsInfo.lib
  LLVMMipsDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMipsDesc.lib
  LLVMMipsAsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMMipsAsmParser.lib
  LLVMNVPTXInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMNVPTXInfo.lib
  LLVMNVPTXDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMNVPTXDesc.lib
  LLVMPowerPCInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMPowerPCInfo.lib
  LLVMPowerPCDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMPowerPCDesc.lib
  LLVMPowerPCAsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMPowerPCAsmParser.lib
  LLVMRISCVInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMRISCVInfo.lib
  LLVMRISCVUtils.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMRISCVUtils.lib
  RISCVInstPrinter.cpp
  RISCVMCTargetDesc.cpp
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/Support/type_traits.h(181,23): error C2338: inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable (compili
ng source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVMCTargetDesc.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDe
sc\LLVMRISCVDesc.vcxproj]
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h(315): message : see reference to class template instantiation 'llvm::is_trivially_copyable<T>' being compiled [C:\dev\src 
\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
          with
          [
              T=std::pair<void *,size_t>
          ] (compiling source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVMCTargetDesc.cpp)
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h(837): message : see reference to class template instantiation 'llvm::SmallVectorImpl<T>' being compiled [C:\dev\src\rust\ 
build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
          with
          [
              T=std::pair<void *,size_t>
          ] (compiling source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVMCTargetDesc.cpp)
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/Support/Allocator.h(378): message : see reference to class template instantiation 'llvm::SmallVector<std::pair<void *,size_t>,0>' being com 
piled (compiling source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVMCTargetDesc.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RI 
SCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/Support/Allocator.h(435): message : see reference to class template instantiation 'llvm::BumpPtrAllocatorImpl<AllocatorT,SlabSize,SizeThres
hold>' being compiled (compiling source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVMCTargetDesc.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\bui 
ld\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h(315,32): error C2976: 'llvm::SmallVectorTemplateBase': too few template arguments (compiling source file C:\dev\src\rust\ 
src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVMCTargetDesc.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]       
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h(179): message : see declaration of 'llvm::SmallVectorTemplateBase' (compiling source file C:\dev\src\rust\src\llvm-projec 
t\llvm\lib\Target\RISCV\MCTargetDesc\RISCVMCTargetDesc.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/Support/type_traits.h(181,23): error C2338: inconsistent behavior between llvm:: and std:: implementation of is_trivially_copyable (compili 
ng source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVInstPrinter.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDes 
c\LLVMRISCVDesc.vcxproj]
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h(315): message : see reference to class template instantiation 'llvm::is_trivially_copyable<T>' being compiled [C:\dev\src 
\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
          with
          [
              T=std::pair<void *,size_t>
          ] (compiling source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVInstPrinter.cpp)
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h(837): message : see reference to class template instantiation 'llvm::SmallVectorImpl<T>' being compiled [C:\dev\src\rust\ 
build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
          with
          [
              T=std::pair<void *,size_t>
          ] (compiling source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVInstPrinter.cpp)
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/Support/Allocator.h(378): message : see reference to class template instantiation 'llvm::SmallVector<std::pair<void *,size_t>,0>' being com 
piled (compiling source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVInstPrinter.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RIS 
CV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/Support/Allocator.h(435): message : see reference to class template instantiation 'llvm::BumpPtrAllocatorImpl<AllocatorT,SlabSize,SizeThres
hold>' being compiled (compiling source file C:\dev\src\rust\src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVInstPrinter.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\buil 
d\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h(315,32): error C2976: 'llvm::SmallVectorTemplateBase': too few template arguments (compiling source file C:\dev\src\rust\ 
src\llvm-project\llvm\lib\Target\RISCV\MCTargetDesc\RISCVInstPrinter.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]        
C:\dev\src\rust\src\llvm-project\llvm\include\llvm/ADT/SmallVector.h(179): message : see declaration of 'llvm::SmallVectorTemplateBase' (compiling source file C:\dev\src\rust\src\llvm-projec 
t\llvm\lib\Target\RISCV\MCTargetDesc\RISCVInstPrinter.cpp) [C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\lib\Target\RISCV\MCTargetDesc\LLVMRISCVDesc.vcxproj]
  LLVMSparcInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMSparcInfo.lib
  LLVMSparcDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMSparcDesc.lib
  LLVMSparcAsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMSparcAsmParser.lib
  LLVMSystemZInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMSystemZInfo.lib
  LLVMSystemZDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMSystemZDesc.lib
  LLVMSystemZAsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMSystemZAsmParser.lib
  LLVMWebAssemblyInfo.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMWebAssemblyInfo.lib
  LLVMWebAssemblyAsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMWebAssemblyAsmParser.lib
  LLVMWebAssemblyDesc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMWebAssemblyDesc.lib
  LLVMX86Info.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMX86Info.lib
  LLVMX86Utils.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMX86Utils.lib
  LLVMX86Desc.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMX86Desc.lib
  LLVMX86AsmParser.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\lib\LLVMX86AsmParser.lib
  llvm-objcopy.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\bin\llvm-objcopy.exe
  llvm-readobj.vcxproj -> C:\dev\src\rust\build\x86_64-pc-windows-msvc\llvm\build\Release\bin\llvm-readobj.exe
thread 'main' panicked at '
command did not execute successfully, got: exit code: 1

build script failed, must exit now', C:\Users\Remco\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.42\src\lib.rs:861:5
stack backtrace:
   0:     0x7ff64d9c733e - backtrace::backtrace::trace_unsynchronized
                               at C:\Users\VssAdministrator\.cargo\registry\src\github.com-1ecc6299db9ec823\backtrace-0.3.46\src\backtrace\mod.rs:66
   1:     0x7ff64d9c733e - std::sys_common::backtrace::_print_fmt
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\sys_common\backtrace.rs:78
   2:     0x7ff64d9c733e - std::sys_common::backtrace::_print::{{impl}}::fmt
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\sys_common\backtrace.rs:59
   3:     0x7ff64d9e919c - core::fmt::write
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libcore\fmt\mod.rs:1076
   4:     0x7ff64d9c13ac - std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\io\mod.rs:1537
   5:     0x7ff64d9cc85b - std::sys_common::backtrace::_print
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\sys_common\backtrace.rs:62
   6:     0x7ff64d9cc85b - std::sys_common::backtrace::print
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\sys_common\backtrace.rs:49
   7:     0x7ff64d9cc85b - std::panicking::default_hook::{{closure}}
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:198
   8:     0x7ff64d9cc4a8 - std::panicking::default_hook
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:218
   9:     0x7ff64d9cd036 - std::panicking::rust_panic_with_hook
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:486
  10:     0x7ff64d9ccbbf - std::panicking::begin_panic_handler
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:388
  11:     0x7ff64d9ccb2c - std::panicking::begin_panic_fmt
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:342
  12:     0x7ff64d5eaffe - cmake::fail
                               at C:\Users\Remco\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.42\src\lib.rs:861
  13:     0x7ff64d5ea933 - cmake::run
                               at C:\Users\Remco\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.42\src\lib.rs:839
  14:     0x7ff64d5e7201 - cmake::Config::build
                               at C:\Users\Remco\.cargo\registry\src\github.com-1ecc6299db9ec823\cmake-0.1.42\src\lib.rs:745
  15:     0x7ff64d1e6f5e - bootstrap::native::{{impl}}::run
                               at C:\dev\src\rust\src\bootstrap\native.rs:296
  16:     0x7ff64d55417d - bootstrap::builder::Builder::ensure<bootstrap::native::Llvm>
                               at C:\dev\src\rust\src\bootstrap\builder.rs:1358
  17:     0x7ff64d3d7d19 - bootstrap::compile::rustc_cargo_env
                               at C:\dev\src\rust\src\bootstrap\compile.rs:581
  18:     0x7ff64d3d7770 - bootstrap::compile::rustc_cargo
                               at C:\dev\src\rust\src\bootstrap\compile.rs:533
  19:     0x7ff64d3d6f07 - bootstrap::compile::{{impl}}::run
                               at C:\dev\src\rust\src\bootstrap\compile.rs:504
  20:     0x7ff64d52dcd9 - bootstrap::builder::Builder::ensure<bootstrap::compile::Rustc>
                               at C:\dev\src\rust\src\bootstrap\builder.rs:1358
  21:     0x7ff64d3d9b12 - bootstrap::compile::{{impl}}::run
                               at C:\dev\src\rust\src\bootstrap\compile.rs:789
  22:     0x7ff64d5401e0 - bootstrap::builder::Builder::ensure<bootstrap::compile::Assemble>
                               at C:\dev\src\rust\src\bootstrap\builder.rs:1358
  23:     0x7ff64d1611bc - bootstrap::builder::Builder::compiler
                               at C:\dev\src\rust\src\bootstrap\builder.rs:577
  24:     0x7ff64d3d9ac7 - bootstrap::compile::{{impl}}::run
                               at C:\dev\src\rust\src\bootstrap\compile.rs:782
  25:     0x7ff64d5401e0 - bootstrap::builder::Builder::ensure<bootstrap::compile::Assemble>
                               at C:\dev\src\rust\src\bootstrap\builder.rs:1358
  26:     0x7ff64d1611bc - bootstrap::builder::Builder::compiler
                               at C:\dev\src\rust\src\bootstrap\builder.rs:577
  27:     0x7ff64d3d2faf - bootstrap::compile::{{impl}}::make_run
                               at C:\dev\src\rust\src\bootstrap\compile.rs:47
  28:     0x7ff64d15cb13 - bootstrap::builder::StepDescription::maybe_run
                               at C:\dev\src\rust\src\bootstrap\builder.rs:188
  29:     0x7ff64d15d3ed - bootstrap::builder::StepDescription::run
                               at C:\dev\src\rust\src\bootstrap\builder.rs:229
  30:     0x7ff64d16116f - bootstrap::builder::Builder::run_step_descriptions
                               at C:\dev\src\rust\src\bootstrap\builder.rs:569
  31:     0x7ff64d161003 - bootstrap::builder::Builder::execute_cli
                               at C:\dev\src\rust\src\bootstrap\builder.rs:560
  32:     0x7ff64cfad7ae - bootstrap::Build::build
                               at C:\dev\src\rust\src\bootstrap\lib.rs:487
  33:     0x7ff64cfa1224 - bootstrap::main
                               at C:\dev\src\rust\src\bootstrap\bin\main.rs:15
  34:     0x7ff64cfa106b - std::rt::lang_start::{{closure}}<()>
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\src\libstd\rt.rs:67
  35:     0x7ff64d9cd236 - std::rt::lang_start_internal::{{closure}}
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\rt.rs:52
  36:     0x7ff64d9cd236 - std::panicking::try::do_call
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:297
  37:     0x7ff64d9cd236 - std::panicking::try
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panicking.rs:274
  38:     0x7ff64d9cd236 - std::panic::catch_unwind
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\panic.rs:394
  39:     0x7ff64d9cd236 - std::rt::lang_start_internal
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\/src\libstd\rt.rs:51
  40:     0x7ff64cfa1043 - std::rt::lang_start<()>
                               at /rustc/1dc0f6d8ef4ff19cfbe468ede40a1a6596f48957\src\libstd\rt.rs:67
  41:     0x7ff64cfa12d0 - main
  42:     0x7ff64d9f0bd4 - invoke_main
                               at D:\agent\_work\8\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  43:     0x7ff64d9f0bd4 - __scrt_common_main_seh
                               at D:\agent\_work\8\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  44:     0x7ffad2eb7bd4 - BaseThreadInitThunk
  45:     0x7ffad454ce51 - RtlUserThreadStart
        finished in 71.065
failed to run: C:\dev\src\rust\build\bootstrap\debug\bootstrap build src/libcore
Build completed unsuccessfully in 0:01:14

It looks like this is being fixed in llvm:

https://reviews.llvm.org/D86126

Thanks! Good to know. Hopefully I'll be able to compile Rust soon then :grimacing: