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

Update deps #929

Merged
merged 7 commits into from
Sep 10, 2021
Merged
Show file tree
Hide file tree
Changes from 5 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
14 changes: 11 additions & 3 deletions cargo/cargo_bootstrap.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,14 @@ def _collect_environ(repository_ctx, host_triple):
fail("File for key '{}' does not exist: {}", key, env_labels[key])
env_labels = {key: str(value) for (key, value) in env_labels.items()}

return dict(env_vars.items() + env_labels.items())
# In addition to platform specific environment variables, a common set (indicated by `*`) will always
# be gathered.
if host_triple == "*":
UebelAndre marked this conversation as resolved.
Show resolved Hide resolved
common_env_vars = dict()
else:
common_env_vars = _collect_environ(repository_ctx, "*")

return dict(common_env_vars.items() + env_vars.items() + env_labels.items())

def _cargo_bootstrap_repository_impl(repository_ctx):
if repository_ctx.attr.version in ("beta", "nightly"):
Expand Down Expand Up @@ -198,14 +205,15 @@ cargo_bootstrap_repository = repository_rule(
"env": attr.string_dict(
doc = (
"A mapping of platform triple to a set of environment variables. See " +
"[cargo_env](#cargo_env) for usage details."
"[cargo_env](#cargo_env) for usage details. Additionally, the platform triple `*` applies to all platforms."
),
),
"env_label": attr.string_dict(
doc = (
"A mapping of platform triple to a set of environment variables. This " +
"attribute differs from `env` in that all variables passed here must be " +
"fully qualified labels of files. See [cargo_env](#cargo_env) for usage details."
"fully qualified labels of files. See [cargo_env](#cargo_env) for usage details. " +
"Additionally, the platform triple `*` applies to all platforms."
),
),
"iso_date": attr.string(
Expand Down
Loading