Replies: 3 comments 1 reply
|
Thanks for the report — confirmed. The rustc cache adapter was conservatively rejecting every I opened #238 to model it as keyed action input. The fix canonicalizes both |
|
Follow-up with numbers from a large workspace (~1200 compilations, 96-core shared box): #238 works: mold remains: Local patch (carried in our nix package until something lands here, ~120 lines across 7 files): the adapter parses Results with the patch, repo rustflags untouched: warm If the approach looks right I can open a PR with the patch as-is. |
|
Thanks for the detailed follow-up. The mold bypass is real, and this approach fits the existing safety model: One correctness detail I want to verify in review: the executable-identity memoization key should contain the resolved linker path, not only the raw selector such as The rest of the proposed boundaries look right: native links only, wasm and unsupported outputs still bypass, conflicting selections bypass, linkless check compilations remain cacheable, and invocations without |
Uh oh!
There was an error while loading. Please reload this page.
Every compilation in a workspace whose cargo config sets
-Z threads=N(parallel rustc frontend) bypasses the cache withunknown-flag: rustc flag is not modeled by the cache adapter: -Zthreads=16.Repro: add
rustflags = "-Z threads=16"to.cargo/config.tomlon a nightly toolchain and runmbx checkwithMBX_BYPASS_LOGset. All compilations bypass.-Zthreadsonly affects codegen scheduling, so it looks safely keyable like other modeled-Zflags. This flag is increasingly common in large workspaces on many-core machines, so modeling it would unlock caching for exactly the builds that benefit most.Observed on mbx 1.1.0 (x86_64-unknown-linux-musl), rustc 1.97.0-nightly.
All reactions