-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Closed
Labels
A-rebuild-detectionArea: rebuild detection and fingerprintingArea: rebuild detection and fingerprintingC-bugCategory: bugCategory: bugP-highPriority: HighPriority: Highregression-from-stable-to-nightlyRegression in nightly that previously worked in stable.Regression in nightly that previously worked in stable.
Description
Problem
A user reported https://bugzilla.mozilla.org/show_bug.cgi?id=1640643, where no-op builds were repeatedly recompiling Rust code.
Steps
- Set up environment to use
lldas the linker. - Run
cargo build - Run
cargo buildagain
Possible Solution(s)
The CARGO_LOG=cargo::core::compiler::fingerprint=trace output linked in the above bug contains a number of:
[2020-05-25T13:33:10Z DEBUG cargo::core::compiler::fingerprint] failed to get mtime of "d:/mozilla/obj-full\\release\\deps\\serde_derive-1d5d1f5a8084dca6.dll.exp": failed to stat `d:/mozilla/obj-full\release\deps\serde_derive-1d5d1f5a8084dca6.dll.exp`
and similar lines. It looks like eac3b66 (cc @ehuss ), as part of a refactoring, introduced an additional requirement of .dll.exp files being present. This appears to be a regression.
Removing
cargo/src/cargo/core/compiler/build_context/target_info.rs
Lines 313 to 320 in 9fcb8c1
| // NOTE: lld does not produce these | |
| ret.push(FileType { | |
| suffix: ".dll.exp".to_string(), | |
| prefix: prefix.clone(), | |
| flavor: FileFlavor::Auxiliary, | |
| crate_type: Some(crate_type.clone()), | |
| should_replace_hyphens: true, | |
| }); |
should fix the bug.
Notes
Output of cargo version: cargo 1.45.0-nightly (500b2bd01 2020-05-18)
Metadata
Metadata
Assignees
Labels
A-rebuild-detectionArea: rebuild detection and fingerprintingArea: rebuild detection and fingerprintingC-bugCategory: bugCategory: bugP-highPriority: HighPriority: Highregression-from-stable-to-nightlyRegression in nightly that previously worked in stable.Regression in nightly that previously worked in stable.