Skip to content

Commit

Permalink
Deduplicate calls to config.is_sibling_repository_layout()
Browse files Browse the repository at this point in the history
This showed up in Starlark CPU profiles and is not negligible as it repeatedly checks allowlists.

Closes bazelbuild#23256.

PiperOrigin-RevId: 671444687
Change-Id: I6e64b0c94332a54fcc5d531ff0e3aab176b7bd0a
  • Loading branch information
fmeum authored and copybara-github committed Sep 5, 2024
1 parent 01079b8 commit b85db78
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ def _init_cc_compilation_context(
pic_header_module = _header_module_artifact(
actions,
label,
config.is_sibling_repository_layout(),
sibling_repo_layout,
"",
".pic.pcm",
)
if generates_no_pic_header_module:
header_module = _header_module_artifact(
actions,
label,
config.is_sibling_repository_layout(),
sibling_repo_layout,
"",
".pcm",
)
Expand All @@ -366,15 +366,15 @@ def _init_cc_compilation_context(
separate_module = _header_module_artifact(
actions,
label,
config.is_sibling_repository_layout(),
sibling_repo_layout,
".sep",
".pcm",
)
if generates_pic_header_module:
separate_pic_module = _header_module_artifact(
actions,
label,
config.is_sibling_repository_layout(),
sibling_repo_layout,
".sep",
".pic.pcm",
)
Expand Down

0 comments on commit b85db78

Please sign in to comment.