Store a PathBuf rather than SerializedModule for cached modules#155036
Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom Apr 21, 2026
Merged
Store a PathBuf rather than SerializedModule for cached modules#155036rust-bors[bot] merged 2 commits intorust-lang:mainfrom
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
Conversation
In cg_gcc ModuleBuffer already only contains a path anyway. And for moving LTO into -Zlink-only we will need to serialize MaybeLtoModules. By storing a path cached modules we avoid writing them to the disk a second time during serialization of MaybeLtoModules.
Collaborator
|
Some changes occurred in compiler/rustc_codegen_gcc |
Collaborator
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
13 tasks
TaKO8Ki
approved these changes
Apr 21, 2026
Member
|
@bors r+ rollup |
Contributor
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 21, 2026
…uwer Rollup of 4 pull requests Successful merges: - #152611 (Modify error message of importing inherent associated items when `#[feature(import_trait_associated_functions)]` is enabled) - #155359 (Improperctypes refactor2.2) - #155036 (Store a PathBuf rather than SerializedModule for cached modules) - #155554 (add warning message when using x fix)
rust-timer
added a commit
that referenced
this pull request
Apr 21, 2026
Rollup merge of #155036 - bjorn3:lto_refactors16, r=TaKO8Ki Store a PathBuf rather than SerializedModule for cached modules In cg_gcc `ModuleBuffer` already only contains a path anyway. And for moving LTO into `-Zlink-only` we will need to serialize `MaybeLtoModules`. By storing a path cached modules we avoid writing them to the disk a second time during serialization of `MaybeLtoModules`. Some further improvements will require changes to cg_gcc that I would prefer landing in the cg_gcc repo to actually test the LTO changes in CI. Part of rust-lang/compiler-team#908
rust-bors Bot
pushed a commit
that referenced
this pull request
Apr 30, 2026
Store a PathBuf rather than SerializedModule for cached modules In cg_gcc `ModuleBuffer` already only contains a path anyway. And for moving LTO into `-Zlink-only` we will need to serialize `MaybeLtoModules`. By storing a path cached modules we avoid writing them to the disk a second time during serialization of `MaybeLtoModules`. Some further improvements will require changes to cg_gcc that I would prefer landing in the cg_gcc repo to actually test the LTO changes in CI. Part of rust-lang/compiler-team#908
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In cg_gcc
ModuleBufferalready only contains a path anyway. And for moving LTO into-Zlink-onlywe will need to serializeMaybeLtoModules. By storing a path cached modules we avoid writing them to the disk a second time during serialization ofMaybeLtoModules.Some further improvements will require changes to cg_gcc that I would prefer landing in the cg_gcc repo to actually test the LTO changes in CI.
Part of rust-lang/compiler-team#908