Skip to content

Commit aa46c32

Browse files
committed
Delete experimental_toolchain_generated_sysroot
1 parent 3d1856b commit aa46c32

File tree

4 files changed

+1
-19
lines changed

4 files changed

+1
-19
lines changed

rust/private/rustc.bzl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1068,8 +1068,7 @@ def construct_arguments(
10681068
))
10691069

10701070
# Ensure the sysroot is set for the target platform
1071-
if toolchain._experimental_toolchain_generated_sysroot:
1072-
rustc_flags.add(toolchain.sysroot, format = "--sysroot=%s")
1071+
rustc_flags.add(toolchain.sysroot, format = "--sysroot=%s")
10731072

10741073
if toolchain._rename_first_party_crates:
10751074
env["RULES_RUST_THIRD_PARTY_DIR"] = toolchain._third_party_dir

rust/settings/BUILD.bazel

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,6 @@ bool_flag(
8585
build_setting_default = True,
8686
)
8787

88-
# A flag to set rustc --sysroot flag to the sysroot generated by rust_toolchain
89-
incompatible_flag(
90-
name = "experimental_toolchain_generated_sysroot",
91-
build_setting_default = True,
92-
issue = "https://github.com/bazelbuild/rules_rust/issues/2039",
93-
)
94-
9588
# A flag to control whether to link libstd dynamically.
9689
bool_flag(
9790
name = "experimental_link_std_dylib",

rust/toolchain.bzl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,6 @@ def _rust_toolchain_impl(ctx):
697697
_experimental_use_cc_common_link = _experimental_use_cc_common_link(ctx),
698698
_experimental_use_global_allocator = experimental_use_global_allocator,
699699
_experimental_use_coverage_metadata_files = ctx.attr._experimental_use_coverage_metadata_files[BuildSettingInfo].value,
700-
_experimental_toolchain_generated_sysroot = ctx.attr._experimental_toolchain_generated_sysroot[IncompatibleFlagInfo].enabled,
701700
_no_std = no_std,
702701
)
703702
return [
@@ -872,13 +871,6 @@ rust_toolchain = rule(
872871
"_cc_toolchain": attr.label(
873872
default = Label("@bazel_tools//tools/cpp:current_cc_toolchain"),
874873
),
875-
"_experimental_toolchain_generated_sysroot": attr.label(
876-
default = Label("//rust/settings:experimental_toolchain_generated_sysroot"),
877-
doc = (
878-
"Label to a boolean build setting that lets the rule knows wheter to set --sysroot to rustc" +
879-
"This flag is only relevant when used together with --@rules_rust//rust/settings:experimental_toolchain_generated_sysroot."
880-
),
881-
),
882874
"_experimental_use_coverage_metadata_files": attr.label(
883875
default = Label("//rust/settings:experimental_use_coverage_metadata_files"),
884876
),

test/toolchain/toolchain_test.bzl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,13 @@ toolchain_adds_rustc_flags_lib_test = analysistest.make(
8181
_toolchain_adds_rustc_flags_lib_impl,
8282
config_settings = {
8383
str(Label("//:extra_rustc_flags")): [CONFIG_FLAG],
84-
str(Label("//rust/settings:experimental_toolchain_generated_sysroot")): True,
8584
},
8685
)
8786

8887
toolchain_adds_rustc_flags_shared_lib_test = analysistest.make(
8988
_toolchain_adds_rustc_flags_shared_lib_impl,
9089
config_settings = {
9190
str(Label("//:extra_rustc_flags")): [CONFIG_FLAG],
92-
str(Label("//rust/settings:experimental_toolchain_generated_sysroot")): True,
9391
},
9492
)
9593

0 commit comments

Comments
 (0)