Skip to content

Commit

Permalink
Use find_sysroot helper.
Browse files Browse the repository at this point in the history
  • Loading branch information
UebelAndre committed Jan 27, 2022
1 parent ff0c0f1 commit 914d159
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rust/private/rustc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
# limitations under the License.

# buildifier: disable=module-docstring
load("@bazel_skylib//lib:paths.bzl", "paths")
load(
"@bazel_tools//tools/build_defs/cc:action_names.bzl",
"CPP_LINK_EXECUTABLE_ACTION_NAME",
)
load("//rust/private:common.bzl", "rust_common")
load("//rust/private:providers.bzl", _BuildInfo = "BuildInfo")
load("//rust/private:stamp.bzl", "is_stamping_enabled")
load("//rust/private:toolchain_utils.bzl", "find_sysroot")
load(
"//rust/private:utils.bzl",
"expand_dict_value_locations",
Expand Down Expand Up @@ -675,7 +675,7 @@ def construct_arguments(
))

# Set the SYSROOT to the directory of the rust_std files passed to the toolchain
env["SYSROOT"] = paths.dirname(toolchain.rust_std.to_list()[0].short_path)
env["SYSROOT"] = find_sysroot(toolchain)

# extra_rustc_flags apply to the target configuration, not the exec configuration.
if hasattr(ctx.attr, "_extra_rustc_flags") and is_exec_configuration(ctx):
Expand Down

0 comments on commit 914d159

Please sign in to comment.