| --- a/rs/toolchains/declare_rustc_toolchains.bzl | |
| +++ b/rs/toolchains/declare_rustc_toolchains.bzl | |
| @@ -188,8 +188,13 @@ def _declare_rustc_toolchains( | |
| "@platforms//os:none": lld_label, | |
| "@platforms//cpu:wasm32": lld_label, | |
| "@platforms//cpu:wasm64": lld_label, | |
| + "@llvm//constraints/windows/abi:msvc": lld_label, | |
| "//conditions:default": None, | |
| }), | |
| + linker_preference = select({ | |
| + "@llvm//constraints/windows/abi:msvc": "rust", | |
| + "//conditions:default": "cc", | |
| + }), | |
| linker_type = "direct", | |
| rust_objcopy = _component(rust_objcopy, triple, rustc_repo_label + "rust-objcopy"), | |
| rustc_lib = _component(rustc_lib, triple, rustc_repo_label + "rustc_lib"), |