Skip to content

Commit a9e7809

Browse files
author
Vinh Tran
committed
Check for _experimental_toolchain_generated_sysroot attribute
1 parent d126146 commit a9e7809

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

rust/private/rustc.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -965,8 +965,9 @@ def construct_arguments(
965965
if linker_script:
966966
rustc_flags.add(linker_script, format = "--codegen=link-arg=-T%s")
967967

968-
if attr._experimental_toolchain_generated_sysroot[BuildSettingInfo].value == True:
969-
rustc_flags.add("--sysroot", toolchain.sysroot)
968+
if hasattr(attr, "_experimental_toolchain_generated_sysroot"):
969+
if attr._experimental_toolchain_generated_sysroot[BuildSettingInfo].value == True:
970+
rustc_flags.add("--sysroot", toolchain.sysroot)
970971

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

0 commit comments

Comments
 (0)