Skip to content

Commit b85db78

Browse files
fmeumcopybara-github
authored andcommitted
Deduplicate calls to config.is_sibling_repository_layout()
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
1 parent 01079b8 commit b85db78

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/starlark/builtins_bzl/common/cc/cc_compilation_helper.bzl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -348,15 +348,15 @@ def _init_cc_compilation_context(
348348
pic_header_module = _header_module_artifact(
349349
actions,
350350
label,
351-
config.is_sibling_repository_layout(),
351+
sibling_repo_layout,
352352
"",
353353
".pic.pcm",
354354
)
355355
if generates_no_pic_header_module:
356356
header_module = _header_module_artifact(
357357
actions,
358358
label,
359-
config.is_sibling_repository_layout(),
359+
sibling_repo_layout,
360360
"",
361361
".pcm",
362362
)
@@ -366,15 +366,15 @@ def _init_cc_compilation_context(
366366
separate_module = _header_module_artifact(
367367
actions,
368368
label,
369-
config.is_sibling_repository_layout(),
369+
sibling_repo_layout,
370370
".sep",
371371
".pcm",
372372
)
373373
if generates_pic_header_module:
374374
separate_pic_module = _header_module_artifact(
375375
actions,
376376
label,
377-
config.is_sibling_repository_layout(),
377+
sibling_repo_layout,
378378
".sep",
379379
".pic.pcm",
380380
)

0 commit comments

Comments
 (0)