Open RossSmyth opened 2 months ago
@rustbot label -needs-triage +T-bootstrap +O-windows-msvc +A-lto +A-contributor-roadblock
We don't configure cargo to change the build configurations for the compiler. To set lto
, you should do it in config.toml
file in the project root
Additional ref: https://rustc-dev-guide.rust-lang.org/building/how-to-build-and-run.html?highlight=config.toml#create-a-configtoml
people might still happen to have this config set for some other reason, which would make it very confusing
We don't configure cargo to change the build configurations for the compiler. To set lto, you should do it in config.toml file in the project root
This is ideal, but the issue isn't about "I want LTO for the compiler." It's about new contributors or just people who want to build the compiler. They attempt to, then get a inscrutable error. And the root cause is a custom global release profile.
When I first saw this I forgot I even had a global config.toml so it took me a couple minutes to figure it out. I basically use it as a "cargo install" profile.
This is on MSVC Windows 10, I'm unsure if that matters.
lto = " fat"
orlto = " thin"
So for example
~/.cargo/config.toml
withx.py build
error: could not compile
rustc-std-workspace-std
(lib) due to 1 previous error warning: build failed, waiting for other jobs to finish... error: could not compileproc_macro
(lib) due to 1 previous error Build completed unsuccessfully in 0:00:41