Skip to content

Commit

Permalink
Add TemplateVariableInfo for build script toolchains attribute.
Browse files Browse the repository at this point in the history
  • Loading branch information
granaghan committed Aug 23, 2023
1 parent af8ef62 commit d1cea1e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cargo/private/cargo_build_script.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ def _cargo_build_script_impl(ctx):
if type(all_files) == "list":
all_files = depset(all_files)
toolchain_tools.append(all_files)
if platform_common.TemplateVariableInfo in target:
variables = getattr(target[platform_common.TemplateVariableInfo], "variables", depset([]))
env.update(variables)

_merge_env_dict(env, expand_dict_value_locations(
ctx,
Expand Down

0 comments on commit d1cea1e

Please sign in to comment.