Skip to content

Commit

Permalink
Skip expanding rustc_env from rust_test
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinh Tran committed Sep 19, 2023
1 parent f3ef458 commit 9db35ca
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions rust/private/rust.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ def _rust_test_impl(ctx):
toolchain = toolchain,
crate_info = crate_info,
rust_flags = ["--test"] if ctx.attr.use_libtest_harness else ["--cfg", "test"],
skip_expanding_rustc_env = True,
)
data = getattr(ctx.attr, "data", [])

Expand Down
4 changes: 3 additions & 1 deletion rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -1266,7 +1266,8 @@ def rustc_compile_action(
output_hash = None,
force_all_deps_direct = False,
create_crate_info_callback = None,
crate_type = None):
crate_type = None,
skip_expanding_rustc_env = False):
"""Create and run a rustc compile action based on the current rule's attributes
Args:
Expand Down Expand Up @@ -1379,6 +1380,7 @@ def rustc_compile_action(
force_all_deps_direct = force_all_deps_direct,
stamp = stamp,
use_json_output = bool(build_metadata),
skip_expanding_rustc_env = skip_expanding_rustc_env,
)

args_metadata = None
Expand Down

0 comments on commit 9db35ca

Please sign in to comment.