File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ bzl_library(
1111 "@build_bazel_rules_nodejs//internal/providers:bzl" ,
1212 ],
1313 deps = [
14+ "@bazel_skylib//lib:paths" ,
1415 "@rules_proto//proto:rules" ,
1516 ],
1617)
Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515# buildifier: disable=module-docstring
16+ load ("@bazel_skylib//lib:paths.bzl" , "paths" )
1617load (
1718 "@bazel_tools//tools/build_defs/cc:action_names.bzl" ,
1819 "CPP_LINK_EXECUTABLE_ACTION_NAME" ,
@@ -487,9 +488,8 @@ def construct_arguments(
487488 data_paths ,
488489 ))
489490
490- # This empty value satisfies Clippy, which otherwise complains about the
491- # sysroot being undefined.
492- env ["SYSROOT" ] = ""
491+ # Set the SYSROOT to the directory of the rust_lib files passed to the toolchain
492+ env ["SYSROOT" ] = paths .dirname (toolchain .rust_lib .files .to_list ()[0 ].short_path )
493493
494494 return args , env
495495
You can’t perform that action at this time.
0 commit comments