Skip to content

Commit 46f2759

Browse files
committed
rustc_target: introduce Env
Improve type safety by using an enum rather than strings.
1 parent 032ba98 commit 46f2759

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
4949
use rustc_session::Session;
5050
use rustc_session::config::OutputFilenames;
5151
use rustc_span::{Symbol, sym};
52-
use rustc_target::spec::{Abi, Arch};
52+
use rustc_target::spec::{Abi, Arch, Env};
5353

5454
pub use crate::config::*;
5555
use crate::prelude::*;
@@ -185,7 +185,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
185185
// won't be available when using a LLVM-built sysroot.
186186
let has_reliable_f16_f128 = !(sess.target.arch == Arch::X86_64
187187
&& sess.target.os == "windows"
188-
&& sess.target.env == "gnu"
188+
&& sess.target.env == Env::Gnu
189189
&& sess.target.abi != Abi::Llvm);
190190

191191
TargetConfig {

0 commit comments

Comments
 (0)