Skip to content

Commit eb74cb4

Browse files
authored
Unrolled build for #149508
Rollup merge of #149508 - mati865:mingw-helpers, r=jieyouxu Prefer helper functions to identify MinGW targets
2 parents 4ad239f + dc61415 commit eb74cb4

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
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 & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +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")
288-
{
287+
if builder.llvm_link_shared() && target.is_windows() && !target.is_windows_gnullvm() {
289288
panic!("shared linking to LLVM is not currently supported on {}", target.triple);
290289
}
291290

0 commit comments

Comments
 (0)