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
lld as the linker.
- Run
cargo build
- Run
cargo build again
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
|
// 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)
Problem
A user reported https://bugzilla.mozilla.org/show_bug.cgi?id=1640643, where no-op builds were repeatedly recompiling Rust code.
Steps
lldas the linker.cargo buildcargo buildagainPossible Solution(s)
The
CARGO_LOG=cargo::core::compiler::fingerprint=traceoutput linked in the above bug contains a number of:and similar lines. It looks like eac3b66 (cc @ehuss ), as part of a refactoring, introduced an additional requirement of
.dll.expfiles 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
should fix the bug.
Notes
Output of
cargo version:cargo 1.45.0-nightly (500b2bd01 2020-05-18)