Rust compiler fails to build when host linker requires extra arguments #94003
Labels
C-bug
Category: This is a bug.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Using a config.toml, I've configured a custom host linker (building on a Mac):
full config.toml
On this machine, the linker requires a custom
--sysroot
to be passed to it, so I also set some environment variables:full environment
But this isn't enough to ensure that
--sysroot
is always passed to the linker, because when I try to build the compiler with./x.py install
, I get:full build output
And the resulting linker command does not include
--sysroot
.To make it easier to reproduce, I created the following script:
Which can be used as the linker in
config.toml
to reproduce this, because it artificially requires the extra command-line argument. On a mac I believe you can get the correct value for the sysroot withxcrun --sdk macosx --show-sdk-path
, on linux I believe/
is a reasonable sysroot to pass.I actually tried patching boostrap.py:
Which gets it a little bit further, but then it fails while building build scripts during the libstd build.
Meta
I noticed this while trying to build the latest commit at the time, which happened to be 9a60099
The text was updated successfully, but these errors were encountered: