From 4b381c251743bcb435e6963f6f7b7307db2c5bad Mon Sep 17 00:00:00 2001 From: Krasimir Georgiev Date: Wed, 11 Sep 2024 11:41:16 +0000 Subject: [PATCH] update patch --- rust/private/rustc.bzl | 2 +- rust/toolchain.bzl | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/rust/private/rustc.bzl b/rust/private/rustc.bzl index 68671387d9..b17a3e0548 100644 --- a/rust/private/rustc.bzl +++ b/rust/private/rustc.bzl @@ -1068,7 +1068,7 @@ def construct_arguments( )) # Ensure the sysroot is set for the target platform - if toolchain._experimental_toolchain_generated_sysroot: + if toolchain._toolchain_generated_sysroot: rustc_flags.add(toolchain.sysroot, format = "--sysroot=%s") if toolchain._rename_first_party_crates: diff --git a/rust/toolchain.bzl b/rust/toolchain.bzl index 17a00c2ea4..14eb6ed803 100644 --- a/rust/toolchain.bzl +++ b/rust/toolchain.bzl @@ -871,13 +871,6 @@ rust_toolchain = rule( "_cc_toolchain": attr.label( default = Label("@bazel_tools//tools/cpp:current_cc_toolchain"), ), - "_toolchain_generated_sysroot": attr.label( - default = Label("//rust/settings:toolchain_generated_sysroot"), - doc = ( - "Label to a boolean build setting that lets the rule knows wheter to set --sysroot to rustc. " + - "This flag is only relevant when used together with --@rules_rust//rust/settings:toolchain_generated_sysroot." - ), - ), "_experimental_use_coverage_metadata_files": attr.label( default = Label("//rust/settings:experimental_use_coverage_metadata_files"), ), @@ -900,6 +893,13 @@ rust_toolchain = rule( "_third_party_dir": attr.label( default = Label("//rust/settings:third_party_dir"), ), + "_toolchain_generated_sysroot": attr.label( + default = Label("//rust/settings:toolchain_generated_sysroot"), + doc = ( + "Label to a boolean build setting that lets the rule knows wheter to set --sysroot to rustc. " + + "This flag is only relevant when used together with --@rules_rust//rust/settings:toolchain_generated_sysroot." + ), + ), }, toolchains = [ "@bazel_tools//tools/cpp:toolchain_type",