Skip to content

Compile Crubit's generated _rust_api_impl.cc files against precompiled header modules. - #2355

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_998618972
Oct 17, 2026
Merged

copybara-service[bot] merged 1 commit into
mainfrom
test_998618972

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Compile Crubit's generated _rust_api_impl.cc files against precompiled 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.

@copybara-service
copybara-service Bot force-pushed the test_998618972 branch 3 times, most recently from 995e50b to 612da63 Compare October 16, 2026 16:21
@copybara-service copybara-service Bot changed the title Compile Crubit's generated _rust_api_impl.cc files against precompiled header modules. Automatic code cleanup. Oct 16, 2026
@copybara-service
copybara-service Bot force-pushed the test_998618972 branch 2 times, most recently from 69d144a to 8ea59b9 Compare October 16, 2026 21:43
@copybara-service copybara-service Bot changed the title Automatic code cleanup. Compile Crubit's generated _rust_api_impl.cc files against precompiled header modules. Oct 16, 2026
@copybara-service
copybara-service Bot force-pushed the test_998618972 branch 3 times, most recently from 43b30e8 to 970a508 Compare October 17, 2026 05:57
…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
copybara-service Bot merged commit d6c7968 into main Oct 17, 2026
2 checks passed
@copybara-service
copybara-service Bot deleted the test_998618972 branch October 17, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant