From 74657cb708442ce0fdbb6a27d66b50878f6896d7 Mon Sep 17 00:00:00 2001 From: Eric Amorde Date: Tue, 3 Dec 2024 14:54:26 -0800 Subject: [PATCH] Avoid calling to_list in _get_cc_info_linker_inputs for performance --- rules/framework.bzl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/rules/framework.bzl b/rules/framework.bzl index 9e5fcc7e..050e6853 100644 --- a/rules/framework.bzl +++ b/rules/framework.bzl @@ -562,10 +562,9 @@ def _get_cc_info_linker_inputs(*, deps): if not CcInfo in dep: continue - for linker_input in dep[CcInfo].linking_context.linker_inputs.to_list(): - linker_inputs.append(linker_input) + linker_inputs.append(dep[CcInfo].linking_context.linker_inputs) - return depset(linker_inputs) + return depset([], transitive = linker_inputs) def _create_swiftmodule(attrs): kwargs = {}