Description
openedon Aug 2, 2024
Code
Repro repository and steps: #128555 (comment)
I've bisected between 1.79.0 and 1.80.0:
searched nightlies: from nightly-2024-04-28 to nightly-2024-06-07
regressed nightly: nightly-2024-05-10
searched commit range: 87293c9...8f9080d
regressed commit: cb93c24
bisected with cargo-bisect-rustc v0.6.9
Host triple: x86_64-pc-windows-msvc
Reproduce with:
cargo bisect-rustc --start 1.79.0 --end 1.80.0 --preserve -- build --release -p <crate-name>
Old context
Context
It's a company project with a workspace that compiles ~680 crates on a clean compile.
From initial testing it seems like an incremental compilation bug :S cargo build
works, cargo build --release
fails, but when setting incremental = false
in [profile.relese]
, cargo build --release
succeeds again.
cargo build --release -p <crate-name>
also reproduces the issue, dropping the number of crates down to "only" 203.
This is our profile config:
[profile.dev]
debug = 0
incremental = true
opt-level = 1
[profile.dev.package."*"]
opt-level = 3
[profile.dev.build-override]
codegen-units = 8
debug = 0
debug-assertions = false
opt-level = 2
overflow-checks = false
[profile.release]
debug = 1
# overwritten in xtask for production builds
incremental = true
[profile.release.build-override]
codegen-units = 8
debug = 0
debug-assertions = false
opt-level = 0
overflow-checks = false
Meta
This reproduces on 1.80 and the current nightly (as of writing this ticket). This does not reproduce on 1.79.0.
rustc --version --verbose
:
rustc 1.80.0 (051478957 2024-07-21)
binary: rustc
commit-hash: 051478957371ee0084a7c0913941d2a8c4757bb9
commit-date: 2024-07-21
host: x86_64-pc-windows-msvc
release: 1.80.0
LLVM version: 18.1.7
and
rustc 1.82.0-nightly (8e86c9567 2024-08-01)
binary: rustc
commit-hash: 8e86c9567154dc5a9ada15ab196d23eae2bd7d89
commit-date: 2024-08-01
host: x86_64-pc-windows-msvc
release: 1.82.0-nightly
LLVM version: 19.1.0
Error output
Intervals are contiguous
!40 = !{i8 -20, i8 -17, i8 4, i8 -20}
rustc-LLVM ERROR: Broken module found, compilation aborted!
error: could not compile `<crate name>` (lib)
There is no backtrace being printed, even with RUST_BACKTRACE=1
.