Skip to content

Commit

Permalink
[7.4.0] Deduplicate calls to config.is_sibling_repository_layout() (#…
Browse files Browse the repository at this point in the history
…23528)

This showed up in Starlark CPU profiles and is not negligible as it
repeatedly checks allowlists.

Closes #23256.

PiperOrigin-RevId: 671444687
Change-Id: I6e64b0c94332a54fcc5d531ff0e3aab176b7bd0a

Commit
b85db78

Co-authored-by: Fabian Meumertzheim <fabian@meumertzhe.im>
  • Loading branch information
bazel-io and fmeum authored Sep 26, 2024
1 parent 9a18bcd commit 5906cf1
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 5906cf1

Please sign in to comment.