Repository navigation
Compile Crubit's generated _rust_api_impl.cc files against precompiled header modules. - #2355
Merged
Merged
Conversation
copybara-service
Bot
force-pushed
the
test_998618972
branch
3 times, most recently
from
October 16, 2026 16:21
995e50b to
612da63
Compare
copybara-service
Bot
force-pushed
the
test_998618972
branch
2 times, most recently
from
October 16, 2026 21:43
69d144a to
8ea59b9
Compare
copybara-service
Bot
force-pushed
the
test_998618972
branch
3 times, most recently
from
October 17, 2026 05:57
43b30e8 to
970a508
Compare
…d header modules. Before this change, the C++ compile of every `_rust_api_impl.cc` file turned off `module_maps`. That meant it re-parsed the target's entire transitive header closure as text, even when every header already had a precompiled `.pcm` from its `cc_library`. For targets with large include graphs, this compile was a large share of the cost of a C++ header edit. This change keeps `module_maps` and `use_header_modules` on for that compile, so it imports the existing `.pcm` files of the wrapped target and its dependencies instead of parsing their headers again. PiperOrigin-RevId: 1001351483
copybara-service
Bot
force-pushed
the
test_998618972
branch
from
October 17, 2026 07:26
970a508 to
d6c7968
Compare
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.
Compile Crubit's generated _rust_api_impl.cc files against precompiled header modules.
Before this change, the C++ compile of every
_rust_api_impl.ccfile turned offmodule_maps. That meant it re-parsed the target's entire transitive headerclosure as text, even when every header already had a precompiled
.pcmfromits
cc_library. For targets with large include graphs, this compile was alarge share of the cost of a C++ header edit.
This change keeps
module_mapsanduse_header_moduleson for that compile, soit imports the existing
.pcmfiles of the wrapped target and its dependenciesinstead of parsing their headers again.