|
31 | 31 | "get_link_group_map_json",
|
32 | 32 | )
|
33 | 33 | load("@prelude//cxx:linker.bzl", "DUMPBIN_SUB_TARGET", "PDB_SUB_TARGET", "get_dumpbin_providers", "get_pdb_providers")
|
| 34 | +load("@prelude//cxx:transformation_spec.bzl", "build_transformation_spec_context") |
34 | 35 | load(
|
35 | 36 | "@prelude//dist:dist_info.bzl",
|
36 | 37 | "DistInfo",
|
|
53 | 54 | "@prelude//tests:re_utils.bzl",
|
54 | 55 | "get_re_executors_from_props",
|
55 | 56 | )
|
| 57 | +load( |
| 58 | + "@prelude//utils:build_graph_pattern.bzl", |
| 59 | + "new_build_graph_info", |
| 60 | +) |
56 | 61 | load("@prelude//utils:utils.bzl", "flatten_dict")
|
57 | 62 | load(
|
58 | 63 | ":build.bzl",
|
@@ -119,10 +124,11 @@ def _rust_binary_common(
|
119 | 124 | link_strategy = LinkStrategy(ctx.attrs.link_style) if ctx.attrs.link_style else DEFAULT_STATIC_LINK_STRATEGY
|
120 | 125 | link_strategy = process_link_strategy_for_pic_behavior(link_strategy, compile_ctx.cxx_toolchain_info.pic_behavior)
|
121 | 126 |
|
| 127 | + cxx_deps = cxx_attr_deps(ctx) |
122 | 128 | resources = flatten_dict(gather_resources(
|
123 | 129 | label = ctx.label,
|
124 | 130 | resources = rust_attr_resources(ctx),
|
125 |
| - deps = cxx_attr_deps(ctx), |
| 131 | + deps = cxx_deps, |
126 | 132 | ).values())
|
127 | 133 |
|
128 | 134 | extra_flags = toolchain_info.rustc_binary_flags + (extra_flags or [])
|
@@ -177,12 +183,15 @@ def _rust_binary_common(
|
177 | 183 | targets_consumed_by_link_groups = targets_consumed_by_link_groups,
|
178 | 184 | )
|
179 | 185 |
|
| 186 | + build_graph_info = new_build_graph_info(ctx, cxx_deps) |
| 187 | + transformation_spec_context = build_transformation_spec_context(ctx, build_graph_info) |
| 188 | + |
180 | 189 | # Gather and setup symlink tree of transitive shared library deps.
|
181 | 190 | shared_libs = build_shared_libs_for_symlink_tree(
|
182 | 191 | use_link_groups = rust_cxx_link_group_info != None,
|
183 | 192 | link_group_ctx = link_group_ctx,
|
184 | 193 | link_strategy = link_strategy,
|
185 |
| - shared_libraries = traverse_shared_library_info(shlib_info, transformation_provider = None), |
| 194 | + shared_libraries = traverse_shared_library_info(shlib_info, transformation_provider = transformation_spec_context), |
186 | 195 | extra_shared_libraries = [],
|
187 | 196 | )
|
188 | 197 |
|
|
0 commit comments