Skip to content

Commit 297e219

Browse files
author
Karim Alweheshy
committed
add .a transitive products to libraries incremental builds
1 parent 31d25aa commit 297e219

File tree

2 files changed

+27
-10
lines changed

2 files changed

+27
-10
lines changed

xcodeproj/internal/files/incremental_output_files.bzl

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,16 @@ def _collect_mixed_language_output_files(
329329
],
330330
)
331331

332+
# TODO: Once BwB mode no longer has target dependencies, remove
333+
# transitive products. Until then we need them, to allow `Copy Bazel
334+
# Outputs` to be able to copy the products of transitive dependencies.
335+
transitive_products = memory_efficient_depset(
336+
transitive = [
337+
info.outputs._transitive_products
338+
for info in mixed_target_infos
339+
],
340+
)
341+
332342
transitive_compile_params = memory_efficient_depset(
333343
compile_params_files,
334344
transitive = [
@@ -354,13 +364,15 @@ def _collect_mixed_language_output_files(
354364
)
355365

356366
products_depset = memory_efficient_depset(
357-
(
358-
# We don't want to declare indexstore files as outputs, because they
359-
# expand to individual files and blow up the BEP. Instead they are
360-
# declared as inputs to `indexstores_filelist`, ensuring they are
361-
# downloaded as needed.
362-
[indexstores_filelist]
363-
),
367+
# We don't want to declare indexstore files as outputs, because they
368+
# expand to individual files and blow up the BEP. Instead they are
369+
# declared as inputs to `indexstores_filelist`, ensuring they are
370+
# downloaded as needed.
371+
[indexstores_filelist],
372+
transitive = [
373+
info.outputs._transitive_products
374+
for info in mixed_target_infos
375+
],
364376
)
365377

366378
direct_group_list = [
@@ -382,8 +394,7 @@ def _collect_mixed_language_output_files(
382394
_transitive_indexstores = transitive_indexstores,
383395
_transitive_infoplists = transitive_infoplists,
384396
_transitive_link_params = transitive_link_params,
385-
# Only top-level targets will have products or dSYM files
386-
_transitive_products = EMPTY_DEPSET,
397+
_transitive_products = products_depset,
387398
),
388399
struct(
389400
_direct_group_list = direct_group_list,
@@ -424,7 +435,12 @@ def _merge_output_files(*, transitive_infos):
424435
for info in transitive_infos
425436
],
426437
),
427-
_transitive_products = EMPTY_DEPSET,
438+
_transitive_products = memory_efficient_depset(
439+
transitive = [
440+
info.outputs._transitive_products
441+
for info in transitive_infos
442+
],
443+
),
428444
)
429445

430446
# Output groups

xcodeproj/internal/processed_targets/incremental_library_targets.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,7 @@ def _process_incremental_library_target(
167167
) = output_files.collect(
168168
actions = actions,
169169
compile_params_files = params_files,
170+
copy_product_transitively = True,
170171
debug_outputs = debug_outputs,
171172
id = id,
172173
name = label.name,

0 commit comments

Comments
 (0)