Skip to content

Commit 8684dd9

Browse files
comiusrickeylevaignas
authored
refactor: Use the linkstamps from linker_inputs instead of from cc_linking_context for to support upcoming CcInfo changes (#3075)
This change allows Bazel to remove linkstamp from CcLinkingContext. The change is a no-op. Co-authored-by: Richard Levasseur <[email protected]> Co-authored-by: Ignas Anikevicius <[email protected]>
1 parent e2295ab commit 8684dd9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

python/private/py_executable.bzl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,7 +1578,11 @@ def _create_shared_native_deps_dso(
15781578
feature_configuration,
15791579
requested_features,
15801580
cc_toolchain):
1581-
linkstamps = py_internal.linking_context_linkstamps(cc_info.linking_context)
1581+
linkstamps = [
1582+
py_internal.linkstamp_file(linkstamp)
1583+
for linker_input in cc_info.linking_context.linker_inputs.to_list()
1584+
for linkstamp in linker_input.linkstamps
1585+
]
15821586

15831587
partially_disabled_thin_lto = (
15841588
cc_common.is_enabled(
@@ -1602,10 +1606,7 @@ def _create_shared_native_deps_dso(
16021606
for input in cc_info.linking_context.linker_inputs.to_list()
16031607
for flag in input.user_link_flags
16041608
],
1605-
linkstamps = [
1606-
py_internal.linkstamp_file(linkstamp)
1607-
for linkstamp in linkstamps.to_list()
1608-
],
1609+
linkstamps = linkstamps,
16091610
build_info_artifacts = _get_build_info(ctx, cc_toolchain) if linkstamps else [],
16101611
features = requested_features,
16111612
is_test_target_partially_disabled_thin_lto = is_test and partially_disabled_thin_lto,

0 commit comments

Comments
 (0)