I am trying to build the latest rust compiler for the esp32 from GitHub - esp-rs/rust: Rust for the xtensa architecture. Built in targets for the ESP32 and ESP8266 using
python3 src/bootstrap/configure.py --experimental-targets=Xtensa --release-channel=nightly --enable-extended --tools=clippy,cargo,rustfmt,rust-analyzer-proc-macro-srv,src --dist-compression-formats='xz' --enable-lld
and python x.py dist --stage 2
It fails while compiling some windows_version_resource.rc
for llvm (Building LLVM for x86_64-pc-windows-msvc
) with the following message:
[2/3161] Building RC object utils\TableGen\CMakeFiles\llvm-min-tblgen.dir\__\__\resources\windows_version_resource.rc.res
FAILED: utils/TableGen/CMakeFiles/llvm-min-tblgen.dir/__/__/resources/windows_version_resource.rc.res
RC C:\rust\src\llvm-project\llvm\resources\windows_version_resource.rc utils\TableGen\CMakeFiles\llvm-min-tblgen.dir\__\__\resources\windows_version_resource.rc.res.d utils\TableGen\CMakeFiles\llvm-min-tblgen.dir\__\__\resources\windows_version_resource.rc.res "Note: including file: " "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.33.31629/bin/HostX64/x64/cl.exe" C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DRC_FILE_VERSION=\"0\" -DRC_INTERNAL_NAME=\"llvm-tblgen\" -DRC_PRODUCT_NAME=\"LLVM\" -DRC_PRODUCT_VERSION=\"0\" -DRC_VERSION_FIELD_1=18 -DRC_VERSION_FIELD_2=1 -DRC_VERSION_FIELD_3=2 -DRC_VERSION_FIELD_4=0 -I C:\rust\build\x86_64-pc-windows-msvc\llvm\build\utils\TableGen -I C:\rust\src\llvm-project\llvm\utils\TableGen -I C:\rust\build\x86_64-pc-windows-msvc\llvm\build\include -I C:\rust\src\llvm-project\llvm\include -DWIN32 /nologo /fo utils\TableGen\CMakeFiles\llvm-min-tblgen.dir\__\__\resources\windows_version_resource.rc.res C:\rust\src\llvm-project\llvm\resources\windows_version_resource.rc
Microsoft (R) Windows (R) Resource Compiler Version 10.0.10011.16384
Copyright (C) Microsoft Corporation. All rights reserved.
fatal error RC1107: invalid usage; use RC /? for Help
I am not sure what that means, manually running this (i.e. skipping the first half of the command)
C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe -DGTEST_HAS_RTTI=0 -DUNICODE -D_CRT_NONSTDC_NO_DEPRECATE -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS -D_HAS_EXCEPTIONS=0 -D_SCL_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_WARNINGS -D_UNICODE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DRC_FILE_VERSION=\"0\" -DRC_INTERNAL_NAME=\"llvm-tblgen\" -DRC_PRODUCT_NAME=\"LLVM\" -DRC_PRODUCT_VERSION=\"0\" -DRC_VERSION_FIELD_1=18 -DRC_VERSION_FIELD_2=1 -DRC_VERSION_FIELD_3=2 -DRC_VERSION_FIELD_4=0 -I C:\rust\build\x86_64-pc-windows-msvc\llvm\build\utils\TableGen -I C:\rust\src\llvm-project\llvm\utils\TableGen -I C:\rust\build\x86_64-pc-windows-msvc\llvm\build\include -I C:\rust\src\llvm-project\llvm\include -DWIN32 /nologo /fo utils\TableGen\CMakeFiles\llvm-min-tblgen.dir\__\__\resources\windows_version_resource.rc.res C:\rust\src\llvm-project\llvm\resources\windows_version_resource.rc
works fine and produces the .res file.