Skip to content

Commit 878ad18

Browse files
committed
Prefer helper functions to identify MinGW targets
1 parent dfe1b8c commit 878ad18

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/bootstrap/src/core/build_steps/dist.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -347,14 +347,14 @@ fn runtime_dll_dist(rust_root: &Path, target: TargetSelection, builder: &Builder
347347

348348
let mut rustc_dlls = vec![];
349349
// windows-gnu and windows-gnullvm require different runtime libs
350-
if target.ends_with("windows-gnu") {
350+
if target.is_windows_gnu(){
351351
rustc_dlls.push("libwinpthread-1.dll");
352352
if target.starts_with("i686-") {
353353
rustc_dlls.push("libgcc_s_dw2-1.dll");
354354
} else {
355355
rustc_dlls.push("libgcc_s_seh-1.dll");
356356
}
357-
} else if target.ends_with("windows-gnullvm") {
357+
} else if target.is_windows_gnullvm() {
358358
rustc_dlls.push("libunwind.dll");
359359
} else {
360360
panic!("Vendoring of runtime DLLs for `{target}` is not supported`");

src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ impl Step for Llvm {
284284
LlvmBuildStatus::ShouldBuild(m) => m,
285285
};
286286

287-
if builder.llvm_link_shared() && target.is_windows() && !target.ends_with("windows-gnullvm")
287+
if builder.llvm_link_shared() && target.is_windows() && !target.is_windows_gnullvm()
288288
{
289289
panic!("shared linking to LLVM is not currently supported on {}", target.triple);
290290
}

0 commit comments

Comments
 (0)