Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 1692845

Browse files
committed
Auto merge of rust-lang#116672 - maurer:128-align, r=<try>
LLVM 18 x86 data layout update With https://reviews.llvm.org/D86310 LLVM now has i128 aligned to 16-bytes on x86 based platforms. This will be in LLVM-18. This patch updates all our spec targets to be 16-byte aligned, and removes the alignment when speaking to older LLVM. This results in Rust overaligning things relative to LLVM on older LLVMs. See rust-lang#54341
2 parents e6707df + 2f13a43 commit 1692845

File tree

66 files changed

+178
-151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+178
-151
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3238,9 +3238,13 @@ mod size_asserts {
32383238
static_assert_size!(Impl, 136);
32393239
static_assert_size!(Item, 136);
32403240
static_assert_size!(ItemKind, 64);
3241-
static_assert_size!(LitKind, 24);
3241+
// This can be removed after i128:128 is in the bootstrap compiler's target.
3242+
#[cfg(not(bootstrap))]
3243+
static_assert_size!(LitKind, 32);
32423244
static_assert_size!(Local, 72);
3243-
static_assert_size!(MetaItemLit, 40);
3245+
// This can be removed after i128:128 is in the bootstrap compiler's target.
3246+
#[cfg(not(bootstrap))]
3247+
static_assert_size!(MetaItemLit, 48);
32443248
static_assert_size!(Param, 40);
32453249
static_assert_size!(Pat, 72);
32463250
static_assert_size!(Path, 24);

compiler/rustc_codegen_llvm/src/abi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use crate::type_::Type;
66
use crate::type_of::LayoutLlvmExt;
77
use crate::value::Value;
88

9-
use rustc_codegen_ssa::mir::operand::OperandValue;
9+
use rustc_codegen_ssa::mir::operand::{OperandRef, OperandValue};
1010
use rustc_codegen_ssa::mir::place::PlaceRef;
1111
use rustc_codegen_ssa::traits::*;
1212
use rustc_codegen_ssa::MemFlags;
@@ -253,7 +253,7 @@ impl<'ll, 'tcx> ArgAbiExt<'ll, 'tcx> for ArgAbi<'tcx, Ty<'tcx>> {
253253
bx.lifetime_end(llscratch, scratch_size);
254254
}
255255
} else {
256-
OperandValue::Immediate(val).store(bx, dst);
256+
OperandRef::from_immediate_or_packed_pair(bx, val, self.layout).val.store(bx, dst);
257257
}
258258
}
259259

compiler/rustc_codegen_llvm/src/builder.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -558,10 +558,17 @@ impl<'a, 'll, 'tcx> BuilderMethods<'a, 'tcx> for Builder<'a, 'll, 'tcx> {
558558
OperandValue::Immediate(self.to_immediate(llval, place.layout))
559559
} else if let abi::Abi::ScalarPair(a, b) = place.layout.abi {
560560
let b_offset = a.size(self).align_to(b.align(self).abi);
561-
let pair_ty = place.layout.llvm_type(self);
562561

563562
let mut load = |i, scalar: abi::Scalar, layout, align, offset| {
564-
let llptr = self.struct_gep(pair_ty, place.llval, i as u64);
563+
let llptr = if i == 0 {
564+
place.llval
565+
} else {
566+
self.inbounds_gep(
567+
self.type_i8(),
568+
place.llval,
569+
&[self.const_usize(b_offset.bytes())],
570+
)
571+
};
565572
let llty = place.layout.scalar_pair_element_llvm_type(self, i, false);
566573
let load = self.load(llty, llptr, align);
567574
scalar_load_metadata(self, load, scalar, layout, offset);

compiler/rustc_codegen_llvm/src/context.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,14 @@ pub unsafe fn create_module<'ll>(
145145
.replace("-Fi64", "");
146146
}
147147
}
148+
if llvm_version < (18, 0, 0) {
149+
if sess.target.arch == "x86" || sess.target.arch == "x86_64" {
150+
// LLVM 18 adjusts i128 to be 128-bit aligned on x86 variants.
151+
// Earlier LLVMs leave this as default alignment, so remove it.
152+
// See https://reviews.llvm.org/D86310
153+
target_data_layout = target_data_layout.replace("-i128:128", "");
154+
}
155+
}
148156

149157
// Ensure the data-layout values hardcoded remain the defaults.
150158
if sess.target.is_builtin {

compiler/rustc_codegen_llvm/src/intrinsic.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,10 @@ impl<'ll, 'tcx> IntrinsicCallMethods<'tcx> for Builder<'_, 'll, 'tcx> {
179179
unsafe {
180180
llvm::LLVMSetAlignment(load, align);
181181
}
182-
self.to_immediate(load, self.layout_of(tp_ty))
182+
if !result.layout.is_zst() {
183+
self.store(load, result.llval, result.align);
184+
}
185+
return;
183186
}
184187
sym::volatile_store => {
185188
let dst = args[0].deref(self.cx());

compiler/rustc_codegen_llvm/src/type_of.rs

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,8 @@ fn uncached_llvm_type<'a, 'tcx>(
2626
let element = layout.scalar_llvm_type_at(cx, element);
2727
return cx.type_vector(element, count);
2828
}
29-
Abi::ScalarPair(..) => {
30-
return cx.type_struct(
31-
&[
32-
layout.scalar_pair_element_llvm_type(cx, 0, false),
33-
layout.scalar_pair_element_llvm_type(cx, 1, false),
34-
],
35-
false,
36-
);
37-
}
38-
Abi::Uninhabited | Abi::Aggregate { .. } => {}
29+
// Treat ScalarPair like a normal aggregate for the purposes of in-memory representation.
30+
Abi::Uninhabited | Abi::Aggregate { .. } | Abi::ScalarPair(..) => {}
3931
}
4032

4133
let name = match layout.ty.kind() {
@@ -275,11 +267,25 @@ impl<'tcx> LayoutLlvmExt<'tcx> for TyAndLayout<'tcx> {
275267
}
276268

277269
fn immediate_llvm_type<'a>(&self, cx: &CodegenCx<'a, 'tcx>) -> &'a Type {
278-
if let Abi::Scalar(scalar) = self.abi {
279-
if scalar.is_bool() {
280-
return cx.type_i1();
270+
match self.abi {
271+
Abi::Scalar(scalar) => {
272+
if scalar.is_bool() {
273+
return cx.type_i1();
274+
}
281275
}
282-
}
276+
Abi::ScalarPair(..) => {
277+
// An immediate pair always contains just the two elements, without any padding
278+
// filler, as it should never be stored to memory.
279+
return cx.type_struct(
280+
&[
281+
self.scalar_pair_element_llvm_type(cx, 0, true),
282+
self.scalar_pair_element_llvm_type(cx, 1, true),
283+
],
284+
false,
285+
);
286+
}
287+
_ => {}
288+
};
283289
self.llvm_type(cx)
284290
}
285291

compiler/rustc_codegen_ssa/src/mir/operand.rs

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -231,14 +231,12 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
231231
bx: &mut Bx,
232232
) -> V {
233233
if let OperandValue::Pair(a, b) = self.val {
234-
let llty = bx.cx().backend_type(self.layout);
234+
let llty = bx.cx().immediate_backend_type(self.layout);
235235
debug!("Operand::immediate_or_packed_pair: packing {:?} into {:?}", self, llty);
236236
// Reconstruct the immediate aggregate.
237237
let mut llpair = bx.cx().const_poison(llty);
238-
let imm_a = bx.from_immediate(a);
239-
let imm_b = bx.from_immediate(b);
240-
llpair = bx.insert_value(llpair, imm_a, 0);
241-
llpair = bx.insert_value(llpair, imm_b, 1);
238+
llpair = bx.insert_value(llpair, a, 0);
239+
llpair = bx.insert_value(llpair, b, 1);
242240
llpair
243241
} else {
244242
self.immediate()
@@ -251,14 +249,12 @@ impl<'a, 'tcx, V: CodegenObject> OperandRef<'tcx, V> {
251249
llval: V,
252250
layout: TyAndLayout<'tcx>,
253251
) -> Self {
254-
let val = if let Abi::ScalarPair(a, b) = layout.abi {
252+
let val = if let Abi::ScalarPair(..) = layout.abi {
255253
debug!("Operand::from_immediate_or_packed_pair: unpacking {:?} @ {:?}", llval, layout);
256254

257255
// Deconstruct the immediate aggregate.
258256
let a_llval = bx.extract_value(llval, 0);
259-
let a_llval = bx.to_immediate_scalar(a_llval, a);
260257
let b_llval = bx.extract_value(llval, 1);
261-
let b_llval = bx.to_immediate_scalar(b_llval, b);
262258
OperandValue::Pair(a_llval, b_llval)
263259
} else {
264260
OperandValue::Immediate(llval)
@@ -435,15 +431,14 @@ impl<'a, 'tcx, V: CodegenObject> OperandValue<V> {
435431
let Abi::ScalarPair(a_scalar, b_scalar) = dest.layout.abi else {
436432
bug!("store_with_flags: invalid ScalarPair layout: {:#?}", dest.layout);
437433
};
438-
let ty = bx.backend_type(dest.layout);
439434
let b_offset = a_scalar.size(bx).align_to(b_scalar.align(bx).abi);
440435

441-
let llptr = bx.struct_gep(ty, dest.llval, 0);
442436
let val = bx.from_immediate(a);
443437
let align = dest.align;
444-
bx.store_with_flags(val, llptr, align, flags);
438+
bx.store_with_flags(val, dest.llval, align, flags);
445439

446-
let llptr = bx.struct_gep(ty, dest.llval, 1);
440+
let llptr =
441+
bx.inbounds_gep(bx.type_i8(), dest.llval, &[bx.const_usize(b_offset.bytes())]);
447442
let val = bx.from_immediate(b);
448443
let align = dest.align.restrict_for_offset(b_offset);
449444
bx.store_with_flags(val, llptr, align, flags);

compiler/rustc_codegen_ssa/src/mir/place.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,7 @@ impl<'a, 'tcx, V: CodegenObject> PlaceRef<'tcx, V> {
112112
if offset == a.size(bx.cx()).align_to(b.align(bx.cx()).abi) =>
113113
{
114114
// Offset matches second field.
115-
let ty = bx.backend_type(self.layout);
116-
bx.struct_gep(ty, self.llval, 1)
115+
bx.inbounds_gep(bx.type_i8(), self.llval, &[bx.const_usize(offset.bytes())])
117116
}
118117
Abi::Scalar(_) | Abi::ScalarPair(..) | Abi::Vector { .. } if field.is_zst() => {
119118
// ZST fields (even some that require alignment) are not included in Scalar,

compiler/rustc_middle/src/mir/mod.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,13 +1651,19 @@ mod size_asserts {
16511651
use super::*;
16521652
use rustc_data_structures::static_assert_size;
16531653
// tidy-alphabetical-start
1654-
static_assert_size!(BasicBlockData<'_>, 136);
1654+
// This can be removed after i128:128 is in the bootstrap compiler's target.
1655+
#[cfg(not(bootstrap))]
1656+
static_assert_size!(BasicBlockData<'_>, 144);
16551657
static_assert_size!(LocalDecl<'_>, 40);
16561658
static_assert_size!(SourceScopeData<'_>, 72);
16571659
static_assert_size!(Statement<'_>, 32);
16581660
static_assert_size!(StatementKind<'_>, 16);
1659-
static_assert_size!(Terminator<'_>, 104);
1660-
static_assert_size!(TerminatorKind<'_>, 88);
1661+
// This can be removed after i128:128 is in the bootstrap compiler's target.
1662+
#[cfg(not(bootstrap))]
1663+
static_assert_size!(Terminator<'_>, 112);
1664+
// This can be removed after i128:128 is in the bootstrap compiler's target.
1665+
#[cfg(not(bootstrap))]
1666+
static_assert_size!(TerminatorKind<'_>, 96);
16611667
static_assert_size!(VarDebugInfo<'_>, 88);
16621668
// tidy-alphabetical-end
16631669
}

compiler/rustc_target/src/spec/targets/i386_apple_ios.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
llvm_target: ios_sim_llvm_target(arch).into(),
1212
pointer_width: 32,
1313
data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
14-
f64:32:64-f80:128-n8:16:32-S128"
14+
i128:128-f64:32:64-f80:128-n8:16:32-S128"
1515
.into(),
1616
arch: arch.target_arch(),
1717
options: TargetOptions { max_atomic_width: Some(64), ..opts("ios", arch) },

compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn target() -> Target {
1818
llvm_target: macos_llvm_target(Arch::I686).into(),
1919
pointer_width: 32,
2020
data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
21-
f64:32:64-f80:128-n8:16:32-S128"
21+
i128:128-f64:32:64-f80:128-n8:16:32-S128"
2222
.into(),
2323
arch: arch.target_arch(),
2424
options: TargetOptions { mcount: "\u{1}mcount".into(), ..base },

compiler/rustc_target/src/spec/targets/i686_linux_android.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ pub fn target() -> Target {
1717
llvm_target: "i686-linux-android".into(),
1818
pointer_width: 32,
1919
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
20-
f64:32:64-f80:32-n8:16:32-S128"
20+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
2121
.into(),
2222
arch: "x86".into(),
2323
options: TargetOptions { supported_sanitizers: SanitizerSet::ADDRESS, ..base },

compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn target() -> Target {
1919
llvm_target: "i686-pc-windows-gnu".into(),
2020
pointer_width: 32,
2121
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
22-
i64:64-f80:32-n8:16:32-a:0:32-S32"
22+
i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"
2323
.into(),
2424
arch: "x86".into(),
2525
options: base,

compiler/rustc_target/src/spec/targets/i686_pc_windows_gnullvm.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn target() -> Target {
1818
llvm_target: "i686-pc-windows-gnu".into(),
1919
pointer_width: 32,
2020
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
21-
i64:64-f80:32-n8:16:32-a:0:32-S32"
21+
i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"
2222
.into(),
2323
arch: "x86".into(),
2424
options: base,

compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn target() -> Target {
2424
llvm_target: "i686-pc-windows-msvc".into(),
2525
pointer_width: 32,
2626
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
27-
i64:64-f80:128-n8:16:32-a:0:32-S32"
27+
i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32"
2828
.into(),
2929
arch: "x86".into(),
3030
options: base,

compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
llvm_target: "i686-unknown-freebsd".into(),
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
14-
f64:32:64-f80:32-n8:16:32-S128"
14+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
1515
.into(),
1616
arch: "x86".into(),
1717
options: base,

compiler/rustc_target/src/spec/targets/i686_unknown_haiku.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
llvm_target: "i686-unknown-haiku".into(),
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
14-
f64:32:64-f80:32-n8:16:32-S128"
14+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
1515
.into(),
1616
arch: "x86".into(),
1717
options: base,

compiler/rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
llvm_target: "i686-unknown-hurd-gnu".into(),
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
14-
f64:32:64-f80:32-n8:16:32-S128"
14+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
1515
.into(),
1616
arch: "x86".into(),
1717
options: base,

compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ pub fn target() -> Target {
1212
llvm_target: "i686-unknown-linux-gnu".into(),
1313
pointer_width: 32,
1414
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
15-
f64:32:64-f80:32-n8:16:32-S128"
15+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
1616
.into(),
1717
arch: "x86".into(),
1818
options: base,

compiler/rustc_target/src/spec/targets/i686_unknown_linux_musl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn target() -> Target {
2525
llvm_target: "i686-unknown-linux-musl".into(),
2626
pointer_width: 32,
2727
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
28-
f64:32:64-f80:32-n8:16:32-S128"
28+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
2929
.into(),
3030
arch: "x86".into(),
3131
options: base,

compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
llvm_target: "i686-unknown-netbsdelf".into(),
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
14-
f64:32:64-f80:32-n8:16:32-S128"
14+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
1515
.into(),
1616
arch: "x86".into(),
1717
options: TargetOptions { mcount: "__mcount".into(), ..base },

compiler/rustc_target/src/spec/targets/i686_unknown_openbsd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
llvm_target: "i686-unknown-openbsd".into(),
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
14-
f64:32:64-f80:32-n8:16:32-S128"
14+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
1515
.into(),
1616
arch: "x86".into(),
1717
options: base,

compiler/rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ pub fn target() -> Target {
1818
llvm_target: "i686-pc-windows-gnu".into(),
1919
pointer_width: 32,
2020
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
21-
i64:64-f80:32-n8:16:32-a:0:32-S32"
21+
i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32"
2222
.into(),
2323
arch: "x86".into(),
2424
options: base,

compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub fn target() -> Target {
99
llvm_target: "i686-pc-windows-msvc".into(),
1010
pointer_width: 32,
1111
data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
12-
i64:64-f80:128-n8:16:32-a:0:32-S32"
12+
i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32"
1313
.into(),
1414
arch: "x86".into(),
1515
options: base,

compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> Target {
1111
llvm_target: "i686-unknown-linux-gnu".into(),
1212
pointer_width: 32,
1313
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
14-
f64:32:64-f80:32-n8:16:32-S128"
14+
i128:128-f64:32:64-f80:32-n8:16:32-S128"
1515
.into(),
1616
arch: "x86".into(),
1717
options: base,

compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ pub fn target() -> Target {
1717
// correctly, we do too.
1818
llvm_target: macos_llvm_target(arch).into(),
1919
pointer_width: 64,
20-
data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
21-
.into(),
20+
data_layout:
21+
"e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
2222
arch: arch.target_arch(),
2323
options: TargetOptions { mcount: "\u{1}mcount".into(), ..base },
2424
}

compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ pub fn target() -> Target {
99
Target {
1010
llvm_target: ios_sim_llvm_target(arch).into(),
1111
pointer_width: 64,
12-
data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
13-
.into(),
12+
data_layout:
13+
"e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
1414
arch: arch.target_arch(),
1515
options: TargetOptions { max_atomic_width: Some(128), ..base },
1616
}

compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ pub fn target() -> Target {
1212
Target {
1313
llvm_target: llvm_target.into(),
1414
pointer_width: 64,
15-
data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
16-
.into(),
15+
data_layout:
16+
"e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(),
1717
arch: arch.target_arch(),
1818
options: TargetOptions { max_atomic_width: Some(128), ..base },
1919
}

0 commit comments

Comments
 (0)