-
-
Notifications
You must be signed in to change notification settings - Fork 14.5k
Description
I'm trying to build the Rust compiler (currently 1.93.1) for Windows using MinGW-w64 + GCC and none of the MSVC tools.
For now I'm still allowing the bootstrap to use LLVM, as I didn't get it working et with GCC.
This resulted in a working build, except for one issue: the Manifest file specifying long path support was not included in the resulting .exe file(s).
Looking at files like:
compiler/rustc/build.rscompiler/rustc_driver/build.rssrc/tools/cargo/build.rs
I see code like:
if Ok("windows") == target_os.as_deref() && Ok("msvc") == target_env.as_deref() {which means MinGW-w64 is not considered on the Windows platform.
For MinGW-w64 the resource compiler is windres and it has different command line arguments than MSVC's rc.
This probably requires some changes in compiler/rustc_windows_rc/src/lib.rs.
For your reference, an example on how to get the manifest in the .exe file could look like this:
cat > "compiler/rustc/Windows Manifest.rc" << EOF
#include <windows.h>
1 RT_MANIFEST "Windows Manifest.xml"
2 ICON "../../src/etc/installer/gfx/rust-logo.ico"
EOF
windres "compiler/rustc/Windows Manifest.rc" -O coff -o "compiler/rustc/Windows Manifest.o"if the .o file is the linked into the .exe file it should contain the manifest (and the icon in this example).
Is anybody working on this, or can you make some suggestions on what is needed to get this working?