Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: access ctx.version_file to inform Bazel stamping info is needed #1952

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions python/private/common/py_executable.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ def py_executable_base_impl(ctx, *, semantics, is_test, inherited_environment =
def _get_build_info(ctx, cc_toolchain):
build_info_files = py_internal.cc_toolchain_build_info_files(cc_toolchain)
if cc_helper.is_stamping_enabled(ctx):
# Makes the target depend on BUILD_INFO_KEY, which helps to discover stamped targets
# See b/326620485 for more details.
ctx.version_file # buildifier: disable=no-effect
return build_info_files.non_redacted_build_info_files.to_list()
else:
return build_info_files.redacted_build_info_files.to_list()
Expand Down
Loading