|
37 | 37 | use crate::abi::call::Conv;
|
38 | 38 | use crate::abi::{Endian, Integer, Size, TargetDataLayout, TargetDataLayoutErrors};
|
39 | 39 | use crate::json::{Json, ToJson};
|
40 |
| -use crate::spec::abi::{lookup as lookup_abi, Abi}; |
| 40 | +use crate::spec::abi::Abi; |
41 | 41 | use crate::spec::crt_objects::CrtObjects;
|
42 | 42 | use rustc_fs_util::try_canonicalize;
|
43 | 43 | use rustc_serialize::{Decodable, Decoder, Encodable, Encoder};
|
@@ -2167,9 +2167,6 @@ pub struct TargetOptions {
|
2167 | 2167 | /// distributed with the target, the sanitizer should still appear in this list for the target.
|
2168 | 2168 | pub supported_sanitizers: SanitizerSet,
|
2169 | 2169 |
|
2170 |
| - /// If present it's a default value to use for adjusting the C ABI. |
2171 |
| - pub default_adjusted_cabi: Option<Abi>, |
2172 |
| - |
2173 | 2170 | /// Minimum number of bits in #[repr(C)] enum. Defaults to the size of c_int
|
2174 | 2171 | pub c_enum_min_bits: Option<u64>,
|
2175 | 2172 |
|
@@ -2399,7 +2396,6 @@ impl Default for TargetOptions {
|
2399 | 2396 | // `Off` is supported by default, but targets can remove this manually, e.g. Windows.
|
2400 | 2397 | supported_split_debuginfo: Cow::Borrowed(&[SplitDebuginfo::Off]),
|
2401 | 2398 | supported_sanitizers: SanitizerSet::empty(),
|
2402 |
| - default_adjusted_cabi: None, |
2403 | 2399 | c_enum_min_bits: None,
|
2404 | 2400 | generate_arange_section: true,
|
2405 | 2401 | supports_stack_protector: true,
|
@@ -2438,11 +2434,11 @@ impl Target {
|
2438 | 2434 | Abi::C { .. } => {
|
2439 | 2435 | if self.arch == "wasm32"
|
2440 | 2436 | && self.os == "unknown"
|
2441 |
| - && cx.wasm_c_abi_opt() == WasmCAbi::Spec |
| 2437 | + && cx.wasm_c_abi_opt() == WasmCAbi::Legacy |
2442 | 2438 | {
|
2443 |
| - abi |
| 2439 | + Abi::Wasm |
2444 | 2440 | } else {
|
2445 |
| - self.default_adjusted_cabi.unwrap_or(abi) |
| 2441 | + abi |
2446 | 2442 | }
|
2447 | 2443 | }
|
2448 | 2444 |
|
@@ -2967,16 +2963,6 @@ impl Target {
|
2967 | 2963 | }
|
2968 | 2964 | }
|
2969 | 2965 | } );
|
2970 |
| - ($key_name:ident, Option<Abi>) => ( { |
2971 |
| - let name = (stringify!($key_name)).replace("_", "-"); |
2972 |
| - obj.remove(&name).and_then(|o| o.as_str().and_then(|s| { |
2973 |
| - match lookup_abi(s) { |
2974 |
| - Ok(abi) => base.$key_name = Some(abi), |
2975 |
| - _ => return Some(Err(format!("'{}' is not a valid value for abi", s))), |
2976 |
| - } |
2977 |
| - Some(Ok(())) |
2978 |
| - })).unwrap_or(Ok(())) |
2979 |
| - } ); |
2980 | 2966 | ($key_name:ident, TargetFamilies) => ( {
|
2981 | 2967 | if let Some(value) = obj.remove("target-family") {
|
2982 | 2968 | if let Some(v) = value.as_array() {
|
@@ -3126,7 +3112,6 @@ impl Target {
|
3126 | 3112 | key!(split_debuginfo, SplitDebuginfo)?;
|
3127 | 3113 | key!(supported_split_debuginfo, fallible_list)?;
|
3128 | 3114 | key!(supported_sanitizers, SanitizerSet)?;
|
3129 |
| - key!(default_adjusted_cabi, Option<Abi>)?; |
3130 | 3115 | key!(generate_arange_section, bool);
|
3131 | 3116 | key!(supports_stack_protector, bool);
|
3132 | 3117 | key!(entry_name);
|
@@ -3390,10 +3375,6 @@ impl ToJson for Target {
|
3390 | 3375 | target_option_val!(entry_abi);
|
3391 | 3376 | target_option_val!(supports_xray);
|
3392 | 3377 |
|
3393 |
| - if let Some(abi) = self.default_adjusted_cabi { |
3394 |
| - d.insert("default-adjusted-cabi".into(), Abi::name(abi).to_json()); |
3395 |
| - } |
3396 |
| - |
3397 | 3378 | // Serializing `-Clink-self-contained` needs a dynamic key to support the
|
3398 | 3379 | // backwards-compatible variants.
|
3399 | 3380 | d.insert(self.link_self_contained.json_key().into(), self.link_self_contained.to_json());
|
|
0 commit comments