Using `-C lto=thin` and `-C no-prepopulate-passes` at the same time for windows target , report link error: undefined symbol
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
We compile hello.rs for x86_64-pc-windows-gnullvm then there is a link error: undefined symbol
rustc -C lto=thin -C no-prepopulate-passes --target=x86_64-pc-windows-gnullvm hello.rs
fn main() {
println!("Hello world!");
}
The rustc version is rustc 1.80.0-nightly (867900499 2024-05-23)
The link error reproduces for target x86_64-pc-windows-gnu and x86_64-pc-windows-gnullvm
It seems that -C no-prepopulate-passes isn't compatible with -Clto.
Maybe we should report error that -C no-prepopulate-passes isn't compatible with -Clto?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the supplied rustc command and hello.rs example for both Windows targets. Investigate how -C lto=thin and -C no-prepopulate-passes are handled together, then verify that the result is either a clear incompatibility error or no longer produces the reported undefined-symbol link error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100