Skip to content

Commit 75bebfd

Browse files
committed
Move musl target_env check into the match
Signed-off-by: Jens Reidel <[email protected]>
1 parent 6d55998 commit 75bebfd

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

compiler/rustc_codegen_llvm/src/llvm_util.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,13 @@ fn update_target_reliable_float_cfg(sess: &Session, cfg: &mut TargetConfig) {
433433
// This rules out anything that doesn't have `long double` = `binary128`; <= 32 bits
434434
// (ld is `f64`), anything other than Linux (Windows and MacOS use `f64`), and `x86`
435435
// (ld is 80-bit extended precision).
436+
//
437+
// musl does not implement the symbols required for f128 math at all.
438+
_ if target_env == "musl" => false,
436439
("x86_64", _) => false,
437440
(_, "linux") if target_pointer_width == 64 => true,
438441
_ => false,
439-
} && cfg.has_reliable_f128
440-
&& target_env != "musl";
442+
} && cfg.has_reliable_f128;
441443
}
442444

443445
pub(crate) fn print_version() {

0 commit comments

Comments
 (0)