Skip to content

Commit 37943e8

Browse files
krallinmeta-codesync[bot]
authored andcommitted
stamp_build_info: respect cxx.cache_links
Summary: Like it says in the title. Reviewed By: AishwaryaSivaraman Differential Revision: D92522009 fbshipit-source-id: a1d800774cae0c36f5d784ee462bd2f84960c966
1 parent 01a2d5f commit 37943e8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

prelude/linking/stamp_build_info.bzl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@ def stamp_build_info(ctx: AnalysisContext, obj: Artifact, stamped_output: Artifa
3333
# This can be run remotely, but it's often cheaper to do this locally for large
3434
# binaries, especially on CI using limited hybrid
3535
prefer_local = not getattr(ctx.attrs, "optimize_for_action_throughput", False)
36+
toolchain = get_cxx_toolchain_info(ctx)
3637

3738
ctx.actions.run(
3839
cmd_args([
39-
get_cxx_toolchain_info(ctx).binary_utilities_info.objcopy,
40+
toolchain.binary_utilities_info.objcopy,
4041
"--add-section",
4142
cmd_args(build_info_json, format = "fb_build_info={}"),
4243
obj,
@@ -48,6 +49,7 @@ def stamp_build_info(ctx: AnalysisContext, obj: Artifact, stamped_output: Artifa
4849
# binaries, especially on CI using limited hybrid.
4950
prefer_local = prefer_local,
5051
prefer_remote = not prefer_local,
52+
allow_cache_upload = toolchain.cxx_compiler_info.allow_cache_upload,
5153
)
5254
return stamped_output
5355
return obj

0 commit comments

Comments
 (0)