Skip to content

Commit 8b14610

Browse files
authored
Merge branch 'main' into rustup
2 parents 74d30cb + ad14c2b commit 8b14610

140 files changed

Lines changed: 1574 additions & 1433 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

crate_universe/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crate_universe/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ exclude = [
4747

4848
[package]
4949
name = "cargo-bazel"
50-
version = "0.17.0"
50+
version = "0.18.0"
5151
authors = ["Andre Brisco - andre.brisco@protonmail.com"]
5252
categories = ["development-tools"]
5353
description = "A collection of tools which use Cargo to generate build targets for Bazel"

crate_universe/private/crates_vendor.bzl

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,19 @@ set -euo pipefail
2424
2525
export RUNTIME_PWD="$(pwd)"
2626
if [[ -z "${{BAZEL_REAL:-}}" ]]; then
27-
BAZEL_REAL="$(which bazel || echo 'bazel')"
27+
export BAZEL_REAL="$(which bazel || echo 'bazel')"
2828
fi
2929
3030
_BIN="$(rlocation "{bin}")"
3131
32-
_ENVIRON=()
33-
_ENVIRON+=(BAZEL_REAL="${{BAZEL_REAL}}")
34-
_ENVIRON+=(BUILD_WORKSPACE_DIRECTORY="${{BUILD_WORKSPACE_DIRECTORY}}")
35-
_ENVIRON+=(PATH="${{PATH}}")
3632
{env}
3733
38-
if [[ -n "${{CARGO_BAZEL_DEBUG:-}}" ]]; then
39-
_ENVIRON+=(CARGO_BAZEL_DEBUG="${{CARGO_BAZEL_DEBUG}}")
40-
fi
41-
42-
# Pass on CARGO_REGISTRIES_* and CARGO_REGISTRY*
43-
while IFS= read -r line; do _ENVIRON+=("${{line}}"); done < <(env | grep ^CARGO_REGISTER)
44-
4534
# The path needs to be preserved to prevent bazel from starting with different
4635
# startup options (requiring a restart of bazel).
4736
# If you provide an empty path, bazel starts itself with
4837
# --default_system_javabase set to the empty string, but if you provide a path,
4938
# it may set it to a value (eg. "/usr/local/buildtools/java/jdk11").
50-
exec env - \\
51-
"${{_ENVIRON[@]}}" \\
39+
exec env -u OUTPUT_BASE \\
5240
"${{_BIN}}" \\
5341
{args} \\
5442
--nonhermetic-root-bazel-workspace-dir="${{BUILD_WORKSPACE_DIRECTORY}}" \\
@@ -143,13 +131,10 @@ def _sys_runfile_env(ctx, name, file, is_windows):
143131
name,
144132
)
145133

146-
return "\n".join([
147-
"export {}=\"$(rlocation \"{}\")\"".format(
148-
name,
149-
_rlocationpath(file, ctx.workspace_name),
150-
),
151-
"_ENVIRON+=({0}=\"${{{0}}}\")".format(name),
152-
])
134+
return "export {}=\"$(rlocation \"{}\")\"".format(
135+
name,
136+
_rlocationpath(file, ctx.workspace_name),
137+
)
153138

154139
def _expand_env(value, is_windows):
155140
if is_windows:

0 commit comments

Comments
 (0)