Skip to content

Commit da78e5a

Browse files
Rollup merge of #153857 - RalfJung:cfg-abi, r=Mark-Simulacrum
Rename `target.abi` to `target.cfg_abi` and enum-ify llvm_abiname See [Zulip](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/De-spaghettifying.20ABI.20controls/with/578893542) for more context. Discussed a bit in rust-lang/rust#153769 (comment) too. This renames `target.abi` to `target.cfg_abi` to make it less likely that someone will use it to determine things about the actual ccABI, i.e. the calling convention used on the target. `target.abi` does not control that calling convention, it just *sometimes* informs the user about that calling convention (and also about other aspects of the ABI). Also turn llvm_abiname into an enum to make it more natural to match on. Cc @workingjubilee @madsmtm
2 parents fe2a2fb + 7048817 commit da78e5a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
4646
use rustc_session::Session;
4747
use rustc_session::config::OutputFilenames;
4848
use rustc_span::{Symbol, sym};
49-
use rustc_target::spec::{Abi, Arch, Env, Os};
49+
use rustc_target::spec::{Arch, CfgAbi, Env, Os};
5050

5151
pub use crate::config::*;
5252
use crate::prelude::*;
@@ -178,7 +178,7 @@ impl CodegenBackend for CraneliftCodegenBackend {
178178
let has_reliable_f16_f128 = !(sess.target.arch == Arch::X86_64
179179
&& sess.target.os == Os::Windows
180180
&& sess.target.env == Env::Gnu
181-
&& sess.target.abi != Abi::Llvm);
181+
&& sess.target.cfg_abi != CfgAbi::Llvm);
182182

183183
// FIXME(f128): f128 math operations need f128 math symbols, which currently aren't always
184184
// filled in by compiler-builtins. The only libc that provides these currently is glibc.

0 commit comments

Comments
 (0)