diff --git a/src/bootstrap/src/core/build_steps/dist.rs b/src/bootstrap/src/core/build_steps/dist.rs index 0efe0cbbc80f0..40149ee09427c 100644 --- a/src/bootstrap/src/core/build_steps/dist.rs +++ b/src/bootstrap/src/core/build_steps/dist.rs @@ -347,14 +347,14 @@ fn runtime_dll_dist(rust_root: &Path, target: TargetSelection, builder: &Builder let mut rustc_dlls = vec![]; // windows-gnu and windows-gnullvm require different runtime libs - if target.ends_with("windows-gnu") { + if target.is_windows_gnu() { rustc_dlls.push("libwinpthread-1.dll"); if target.starts_with("i686-") { rustc_dlls.push("libgcc_s_dw2-1.dll"); } else { rustc_dlls.push("libgcc_s_seh-1.dll"); } - } else if target.ends_with("windows-gnullvm") { + } else if target.is_windows_gnullvm() { rustc_dlls.push("libunwind.dll"); } else { panic!("Vendoring of runtime DLLs for `{target}` is not supported`"); diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index a591be05291fa..4de5184c0e998 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -284,8 +284,7 @@ impl Step for Llvm { LlvmBuildStatus::ShouldBuild(m) => m, }; - if builder.llvm_link_shared() && target.is_windows() && !target.ends_with("windows-gnullvm") - { + if builder.llvm_link_shared() && target.is_windows() && !target.is_windows_gnullvm() { panic!("shared linking to LLVM is not currently supported on {}", target.triple); }