Skip to content

Commit 849c6c6

Browse files
author
Vinh Tran
committed
Remove sandboxed attr
1 parent d34afde commit 849c6c6

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

rust/private/rustc.bzl

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -788,8 +788,7 @@ def construct_arguments(
788788
use_json_output = False,
789789
build_metadata = False,
790790
force_depend_on_objects = False,
791-
skip_expanding_rustc_env = False,
792-
sandboxed = True):
791+
skip_expanding_rustc_env = False):
793792
"""Builds an Args object containing common rustc flags
794793
795794
Args:
@@ -820,7 +819,6 @@ def construct_arguments(
820819
build_metadata (bool): Generate CLI arguments for building *only* .rmeta files. This requires use_json_output.
821820
force_depend_on_objects (bool): Force using `.rlib` object files instead of metadata (`.rmeta`) files even if they are available.
822821
skip_expanding_rustc_env (bool): Whether to skip expanding CrateInfo.rustc_env_attr
823-
sandboxed (bool): Whether the action using the constructed arguments is sandboxed
824822
825823
Returns:
826824
tuple: A tuple of the following items
@@ -967,12 +965,9 @@ def construct_arguments(
967965
if linker_script:
968966
rustc_flags.add(linker_script, format = "--codegen=link-arg=-T%s")
969967

970-
if sandboxed:
971-
if hasattr(ctx.attr, "_experimental_toolchain_generated_sysroot"):
972-
if ctx.attr._experimental_toolchain_generated_sysroot[BuildSettingInfo].value == True:
973-
rustc_flags.add("--sysroot", toolchain.sysroot)
974-
else:
975-
rustc_flags.add(toolchain.sysroot_short_path, format = "--sysroot=${{pwd}}/%s")
968+
if hasattr(ctx.attr, "_experimental_toolchain_generated_sysroot"):
969+
if ctx.attr._experimental_toolchain_generated_sysroot[BuildSettingInfo].value == True:
970+
rustc_flags.add("--sysroot", toolchain.sysroot)
976971

977972
# Tell Rustc where to find the standard library (or libcore)
978973
rustc_flags.add_all(toolchain.rust_std_paths, before_each = "-L", format_each = "%s")

rust/private/rustdoc.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,6 @@ def rustdoc_compile_action(
126126
rustdoc = True,
127127
force_depend_on_objects = is_test,
128128
skip_expanding_rustc_env = True,
129-
# rustdoc tests compile tests outside of the sandbox
130-
sandboxed = not is_test,
131129
)
132130

133131
# Because rustdoc tests compile tests outside of the sandbox, the sysroot

0 commit comments

Comments
 (0)