Skip to content

Commit 77c4afa

Browse files
authored
Avoid calling to_list in _get_cc_info_linker_inputs for performance (#930)
This is slow for very large targets and slows down `_apple_framework_packaging_impl`. Before: ![Screenshot 2024-12-03 at 2 51 43 PM](https://github.com/user-attachments/assets/ad253422-9afb-4fed-aab9-cb835f9fe17b) After: ![Screenshot 2024-12-03 at 2 53 10 PM](https://github.com/user-attachments/assets/c3a79512-dae1-4bbb-812a-fa469725528d)
1 parent c148e6a commit 77c4afa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

rules/framework.bzl

+2-3
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,9 @@ def _get_cc_info_linker_inputs(*, deps):
562562
if not CcInfo in dep:
563563
continue
564564

565-
for linker_input in dep[CcInfo].linking_context.linker_inputs.to_list():
566-
linker_inputs.append(linker_input)
565+
linker_inputs.append(dep[CcInfo].linking_context.linker_inputs)
567566

568-
return depset(linker_inputs)
567+
return depset([], transitive = linker_inputs)
569568

570569
def _create_swiftmodule(attrs):
571570
kwargs = {}

0 commit comments

Comments
 (0)