Skip to content

Commit 6c0a406

Browse files
authored
Rollup merge of rust-lang#62474 - nikic:update-llvm, r=alexcrichton
Prepare for LLVM 9 update Main changes: * In preparation for opaque pointer types, the `byval` attribute now takes a type. As such, the argument type needs to be threaded through to the function/callsite attribute application logic. * On ARM the `+fp-only-sp` and `+d16` features have become `-fp64` and `-d32`. I've switched the target definitions to use the new names, but also added bidirectional emulation so either can be used on any LLVM version for backwards compatibility. * The datalayout can now specify function pointer alignment. In particular on ARM `Fi8` is specified, which means that function pointer alignment is independent of function alignment. I've added this to our datalayouts to match LLVM (which is something we check) and strip the fnptr alignment for older LLVM versions. * The fmul/fadd reductions now always respect the accumulator (including for unordered reductions), so we should pass the identity instead of undef. Open issues: * https://reviews.llvm.org/D62106 causes linker errors with ld.bdf due to https://sourceware.org/bugzilla/show_bug.cgi?id=24784. To avoid this I've enabled `RelaxELFRelocations`, which results in a GOTPCRELX relocation for `__tls_get_addr` and avoids the issue. However, this is likely not acceptable because relax relocations are not supported by older linker versions. We may need an LLVM option to keep using PLT for `__tls_get_addr` despite `RtLibUseGOT`. The corresponding llvm-project PR is rust-lang/llvm-project#19. r? @ghost
2 parents fe26fc9 + ac56025 commit 6c0a406

Some content is hidden

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

44 files changed

+160
-85
lines changed

src/librustc_codegen_llvm/abi.rs

+35-29
Original file line numberDiff line numberDiff line change
@@ -34,17 +34,17 @@ trait ArgAttributeExt {
3434
impl ArgAttributeExt for ArgAttribute {
3535
fn for_each_kind<F>(&self, mut f: F) where F: FnMut(llvm::Attribute) {
3636
for_each_kind!(self, f,
37-
ByVal, NoAlias, NoCapture, NonNull, ReadOnly, SExt, StructRet, ZExt, InReg)
37+
NoAlias, NoCapture, NonNull, ReadOnly, SExt, StructRet, ZExt, InReg)
3838
}
3939
}
4040

4141
pub trait ArgAttributesExt {
42-
fn apply_llfn(&self, idx: AttributePlace, llfn: &Value);
43-
fn apply_callsite(&self, idx: AttributePlace, callsite: &Value);
42+
fn apply_llfn(&self, idx: AttributePlace, llfn: &Value, ty: Option<&Type>);
43+
fn apply_callsite(&self, idx: AttributePlace, callsite: &Value, ty: Option<&Type>);
4444
}
4545

4646
impl ArgAttributesExt for ArgAttributes {
47-
fn apply_llfn(&self, idx: AttributePlace, llfn: &Value) {
47+
fn apply_llfn(&self, idx: AttributePlace, llfn: &Value, ty: Option<&Type>) {
4848
let mut regular = self.regular;
4949
unsafe {
5050
let deref = self.pointee_size.bytes();
@@ -65,11 +65,14 @@ impl ArgAttributesExt for ArgAttributes {
6565
idx.as_uint(),
6666
align.bytes() as u32);
6767
}
68+
if regular.contains(ArgAttribute::ByVal) {
69+
llvm::LLVMRustAddByValAttr(llfn, idx.as_uint(), ty.unwrap());
70+
}
6871
regular.for_each_kind(|attr| attr.apply_llfn(idx, llfn));
6972
}
7073
}
7174

72-
fn apply_callsite(&self, idx: AttributePlace, callsite: &Value) {
75+
fn apply_callsite(&self, idx: AttributePlace, callsite: &Value, ty: Option<&Type>) {
7376
let mut regular = self.regular;
7477
unsafe {
7578
let deref = self.pointee_size.bytes();
@@ -90,6 +93,9 @@ impl ArgAttributesExt for ArgAttributes {
9093
idx.as_uint(),
9194
align.bytes() as u32);
9295
}
96+
if regular.contains(ArgAttribute::ByVal) {
97+
llvm::LLVMRustAddByValCallSiteAttr(callsite, idx.as_uint(), ty.unwrap());
98+
}
9399
regular.for_each_kind(|attr| attr.apply_callsite(idx, callsite));
94100
}
95101
}
@@ -298,7 +304,7 @@ pub trait FnTypeLlvmExt<'tcx> {
298304
fn llvm_type(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type;
299305
fn ptr_to_llvm_type(&self, cx: &CodegenCx<'ll, 'tcx>) -> &'ll Type;
300306
fn llvm_cconv(&self) -> llvm::CallConv;
301-
fn apply_attrs_llfn(&self, llfn: &'ll Value);
307+
fn apply_attrs_llfn(&self, cx: &CodegenCx<'ll, 'tcx>, llfn: &'ll Value);
302308
fn apply_attrs_callsite(&self, bx: &mut Builder<'a, 'll, 'tcx>, callsite: &'ll Value);
303309
}
304310

@@ -384,51 +390,51 @@ impl<'tcx> FnTypeLlvmExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
384390
}
385391
}
386392

387-
fn apply_attrs_llfn(&self, llfn: &'ll Value) {
393+
fn apply_attrs_llfn(&self, cx: &CodegenCx<'ll, 'tcx>, llfn: &'ll Value) {
388394
let mut i = 0;
389-
let mut apply = |attrs: &ArgAttributes| {
390-
attrs.apply_llfn(llvm::AttributePlace::Argument(i), llfn);
395+
let mut apply = |attrs: &ArgAttributes, ty: Option<&Type>| {
396+
attrs.apply_llfn(llvm::AttributePlace::Argument(i), llfn, ty);
391397
i += 1;
392398
};
393399
match self.ret.mode {
394400
PassMode::Direct(ref attrs) => {
395-
attrs.apply_llfn(llvm::AttributePlace::ReturnValue, llfn);
401+
attrs.apply_llfn(llvm::AttributePlace::ReturnValue, llfn, None);
396402
}
397-
PassMode::Indirect(ref attrs, _) => apply(attrs),
403+
PassMode::Indirect(ref attrs, _) => apply(attrs, Some(self.ret.layout.llvm_type(cx))),
398404
_ => {}
399405
}
400406
for arg in &self.args {
401407
if arg.pad.is_some() {
402-
apply(&ArgAttributes::new());
408+
apply(&ArgAttributes::new(), None);
403409
}
404410
match arg.mode {
405411
PassMode::Ignore(_) => {}
406412
PassMode::Direct(ref attrs) |
407-
PassMode::Indirect(ref attrs, None) => apply(attrs),
413+
PassMode::Indirect(ref attrs, None) => apply(attrs, Some(arg.layout.llvm_type(cx))),
408414
PassMode::Indirect(ref attrs, Some(ref extra_attrs)) => {
409-
apply(attrs);
410-
apply(extra_attrs);
415+
apply(attrs, None);
416+
apply(extra_attrs, None);
411417
}
412418
PassMode::Pair(ref a, ref b) => {
413-
apply(a);
414-
apply(b);
419+
apply(a, None);
420+
apply(b, None);
415421
}
416-
PassMode::Cast(_) => apply(&ArgAttributes::new()),
422+
PassMode::Cast(_) => apply(&ArgAttributes::new(), None),
417423
}
418424
}
419425
}
420426

421427
fn apply_attrs_callsite(&self, bx: &mut Builder<'a, 'll, 'tcx>, callsite: &'ll Value) {
422428
let mut i = 0;
423-
let mut apply = |attrs: &ArgAttributes| {
424-
attrs.apply_callsite(llvm::AttributePlace::Argument(i), callsite);
429+
let mut apply = |attrs: &ArgAttributes, ty: Option<&Type>| {
430+
attrs.apply_callsite(llvm::AttributePlace::Argument(i), callsite, ty);
425431
i += 1;
426432
};
427433
match self.ret.mode {
428434
PassMode::Direct(ref attrs) => {
429-
attrs.apply_callsite(llvm::AttributePlace::ReturnValue, callsite);
435+
attrs.apply_callsite(llvm::AttributePlace::ReturnValue, callsite, None);
430436
}
431-
PassMode::Indirect(ref attrs, _) => apply(attrs),
437+
PassMode::Indirect(ref attrs, _) => apply(attrs, Some(self.ret.layout.llvm_type(bx))),
432438
_ => {}
433439
}
434440
if let layout::Abi::Scalar(ref scalar) = self.ret.layout.abi {
@@ -446,21 +452,21 @@ impl<'tcx> FnTypeLlvmExt<'tcx> for FnType<'tcx, Ty<'tcx>> {
446452
}
447453
for arg in &self.args {
448454
if arg.pad.is_some() {
449-
apply(&ArgAttributes::new());
455+
apply(&ArgAttributes::new(), None);
450456
}
451457
match arg.mode {
452458
PassMode::Ignore(_) => {}
453459
PassMode::Direct(ref attrs) |
454-
PassMode::Indirect(ref attrs, None) => apply(attrs),
460+
PassMode::Indirect(ref attrs, None) => apply(attrs, Some(arg.layout.llvm_type(bx))),
455461
PassMode::Indirect(ref attrs, Some(ref extra_attrs)) => {
456-
apply(attrs);
457-
apply(extra_attrs);
462+
apply(attrs, None);
463+
apply(extra_attrs, None);
458464
}
459465
PassMode::Pair(ref a, ref b) => {
460-
apply(a);
461-
apply(b);
466+
apply(a, None);
467+
apply(b, None);
462468
}
463-
PassMode::Cast(_) => apply(&ArgAttributes::new()),
469+
PassMode::Cast(_) => apply(&ArgAttributes::new(), None),
464470
}
465471
}
466472

src/librustc_codegen_llvm/attributes.rs

+24
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,29 @@ pub fn set_probestack(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {
119119
const_cstr!("probe-stack"), const_cstr!("__rust_probestack"));
120120
}
121121

122+
fn translate_obsolete_target_features(feature: &str) -> &str {
123+
const LLVM9_FEATURE_CHANGES: &[(&str, &str)] = &[
124+
("+fp-only-sp", "-fp64"),
125+
("-fp-only-sp", "+fp64"),
126+
("+d16", "-d32"),
127+
("-d16", "+d32"),
128+
];
129+
if llvm_util::get_major_version() >= 9 {
130+
for &(old, new) in LLVM9_FEATURE_CHANGES {
131+
if feature == old {
132+
return new;
133+
}
134+
}
135+
} else {
136+
for &(old, new) in LLVM9_FEATURE_CHANGES {
137+
if feature == new {
138+
return old;
139+
}
140+
}
141+
}
142+
feature
143+
}
144+
122145
pub fn llvm_target_features(sess: &Session) -> impl Iterator<Item = &str> {
123146
const RUSTC_SPECIFIC_FEATURES: &[&str] = &[
124147
"crt-static",
@@ -129,6 +152,7 @@ pub fn llvm_target_features(sess: &Session) -> impl Iterator<Item = &str> {
129152
sess.target.target.options.features.split(',')
130153
.chain(cmdline)
131154
.filter(|l| !l.is_empty())
155+
.map(translate_obsolete_target_features)
132156
}
133157

134158
pub fn apply_target_cpu_attr(cx: &CodegenCx<'ll, '_>, llfn: &'ll Value) {

src/librustc_codegen_llvm/common.rs

+4
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ impl ConstMethods<'tcx> for CodegenCx<'ll, 'tcx> {
249249
self.const_uint(self.type_i8(), i as u64)
250250
}
251251

252+
fn const_real(&self, t: &'ll Type, val: f64) -> &'ll Value {
253+
unsafe { llvm::LLVMConstReal(t, val) }
254+
}
255+
252256
fn const_struct(
253257
&self,
254258
elts: &[&'ll Value],

src/librustc_codegen_llvm/context.rs

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use crate::attributes;
22
use crate::llvm;
3+
use crate::llvm_util;
34
use crate::debuginfo;
45
use crate::value::Value;
56
use rustc::dep_graph::DepGraphSafe;
@@ -140,6 +141,11 @@ pub fn is_pie_binary(sess: &Session) -> bool {
140141
!is_any_library(sess) && get_reloc_model(sess) == llvm::RelocMode::PIC
141142
}
142143

144+
fn strip_function_ptr_alignment(data_layout: String) -> String {
145+
// FIXME: Make this more general.
146+
data_layout.replace("-Fi8-", "-")
147+
}
148+
143149
pub unsafe fn create_module(
144150
tcx: TyCtxt<'_>,
145151
llcx: &'ll llvm::Context,
@@ -149,14 +155,19 @@ pub unsafe fn create_module(
149155
let mod_name = SmallCStr::new(mod_name);
150156
let llmod = llvm::LLVMModuleCreateWithNameInContext(mod_name.as_ptr(), llcx);
151157

158+
let mut target_data_layout = sess.target.target.data_layout.clone();
159+
if llvm_util::get_major_version() < 9 {
160+
target_data_layout = strip_function_ptr_alignment(target_data_layout);
161+
}
162+
152163
// Ensure the data-layout values hardcoded remain the defaults.
153164
if sess.target.target.options.is_builtin {
154165
let tm = crate::back::write::create_informational_target_machine(&tcx.sess, false);
155166
llvm::LLVMRustSetDataLayoutFromTargetMachine(llmod, tm);
156167
llvm::LLVMRustDisposeTargetMachine(tm);
157168

158-
let data_layout = llvm::LLVMGetDataLayout(llmod);
159-
let data_layout = str::from_utf8(CStr::from_ptr(data_layout).to_bytes())
169+
let llvm_data_layout = llvm::LLVMGetDataLayout(llmod);
170+
let llvm_data_layout = str::from_utf8(CStr::from_ptr(llvm_data_layout).to_bytes())
160171
.ok().expect("got a non-UTF8 data-layout from LLVM");
161172

162173
// Unfortunately LLVM target specs change over time, and right now we
@@ -177,16 +188,16 @@ pub unsafe fn create_module(
177188
let cfg_llvm_root = option_env!("CFG_LLVM_ROOT").unwrap_or("");
178189
let custom_llvm_used = cfg_llvm_root.trim() != "";
179190

180-
if !custom_llvm_used && sess.target.target.data_layout != data_layout {
191+
if !custom_llvm_used && target_data_layout != llvm_data_layout {
181192
bug!("data-layout for builtin `{}` target, `{}`, \
182193
differs from LLVM default, `{}`",
183194
sess.target.target.llvm_target,
184-
sess.target.target.data_layout,
185-
data_layout);
195+
target_data_layout,
196+
llvm_data_layout);
186197
}
187198
}
188199

189-
let data_layout = SmallCStr::new(&sess.target.target.data_layout);
200+
let data_layout = SmallCStr::new(&target_data_layout);
190201
llvm::LLVMSetDataLayout(llmod, data_layout.as_ptr());
191202

192203
let llvm_target = SmallCStr::new(&sess.target.target.llvm_target);

src/librustc_codegen_llvm/declare.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ impl DeclareMethods<'tcx> for CodegenCx<'ll, 'tcx> {
107107
llvm::Attribute::NoReturn.apply_llfn(Function, llfn);
108108
}
109109

110-
fty.apply_attrs_llfn(llfn);
110+
fty.apply_attrs_llfn(self, llfn);
111111

112112
llfn
113113
}

src/librustc_codegen_llvm/intrinsic.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -1663,9 +1663,10 @@ fn generic_simd_intrinsic(
16631663
acc
16641664
} else {
16651665
// unordered arithmetic reductions do not:
1666+
let identity_acc = if $name.contains("mul") { 1.0 } else { 0.0 };
16661667
match f.bit_width() {
1667-
32 => bx.const_undef(bx.type_f32()),
1668-
64 => bx.const_undef(bx.type_f64()),
1668+
32 => bx.const_real(bx.type_f32(), identity_acc),
1669+
64 => bx.const_real(bx.type_f64(), identity_acc),
16691670
v => {
16701671
return_error!(r#"
16711672
unsupported {} from `{}` with element `{}` of size `{}` to `{}`"#,

src/librustc_codegen_llvm/llvm/ffi.rs

+3
Original file line numberDiff line numberDiff line change
@@ -715,6 +715,7 @@ extern "C" {
715715
// Operations on scalar constants
716716
pub fn LLVMConstInt(IntTy: &Type, N: c_ulonglong, SignExtend: Bool) -> &Value;
717717
pub fn LLVMConstIntOfArbitraryPrecision(IntTy: &Type, Wn: c_uint, Ws: *const u64) -> &Value;
718+
pub fn LLVMConstReal(RealTy: &Type, N: f64) -> &Value;
718719
pub fn LLVMConstIntGetZExtValue(ConstantVal: &Value) -> c_ulonglong;
719720
pub fn LLVMRustConstInt128Get(ConstantVal: &Value, SExt: bool,
720721
high: &mut u64, low: &mut u64) -> bool;
@@ -794,6 +795,7 @@ extern "C" {
794795
pub fn LLVMRustAddAlignmentAttr(Fn: &Value, index: c_uint, bytes: u32);
795796
pub fn LLVMRustAddDereferenceableAttr(Fn: &Value, index: c_uint, bytes: u64);
796797
pub fn LLVMRustAddDereferenceableOrNullAttr(Fn: &Value, index: c_uint, bytes: u64);
798+
pub fn LLVMRustAddByValAttr(Fn: &Value, index: c_uint, ty: &Type);
797799
pub fn LLVMRustAddFunctionAttribute(Fn: &Value, index: c_uint, attr: Attribute);
798800
pub fn LLVMRustAddFunctionAttrStringValue(Fn: &Value,
799801
index: c_uint,
@@ -824,6 +826,7 @@ extern "C" {
824826
pub fn LLVMRustAddDereferenceableOrNullCallSiteAttr(Instr: &Value,
825827
index: c_uint,
826828
bytes: u64);
829+
pub fn LLVMRustAddByValCallSiteAttr(Instr: &Value, index: c_uint, ty: &Type);
827830

828831
// Operations on load/store instructions (only)
829832
pub fn LLVMSetVolatile(MemoryAccessInst: &Value, volatile: Bool);

src/librustc_codegen_ssa/traits/consts.rs

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ pub trait ConstMethods<'tcx>: BackendTypes {
1717
fn const_u64(&self, i: u64) -> Self::Value;
1818
fn const_usize(&self, i: u64) -> Self::Value;
1919
fn const_u8(&self, i: u8) -> Self::Value;
20+
fn const_real(&self, t: Self::Type, val: f64) -> Self::Value;
2021

2122
fn const_struct(&self, elts: &[Self::Value], packed: bool) -> Self::Value;
2223

src/librustc_target/spec/arm_linux_androideabi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn target() -> TargetResult {
1111
target_endian: "little".to_string(),
1212
target_pointer_width: "32".to_string(),
1313
target_c_int_width: "32".to_string(),
14-
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
14+
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
1515
arch: "arm".to_string(),
1616
target_os: "android".to_string(),
1717
target_env: String::new(),

src/librustc_target/spec/arm_unknown_linux_gnueabi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub fn target() -> TargetResult {
88
target_endian: "little".to_string(),
99
target_pointer_width: "32".to_string(),
1010
target_c_int_width: "32".to_string(),
11-
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
11+
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
1212
arch: "arm".to_string(),
1313
target_os: "linux".to_string(),
1414
target_env: "gnu".to_string(),

src/librustc_target/spec/arm_unknown_linux_gnueabihf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ pub fn target() -> TargetResult {
88
target_endian: "little".to_string(),
99
target_pointer_width: "32".to_string(),
1010
target_c_int_width: "32".to_string(),
11-
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
11+
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
1212
arch: "arm".to_string(),
1313
target_os: "linux".to_string(),
1414
target_env: "gnu".to_string(),

src/librustc_target/spec/arm_unknown_linux_musleabi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn target() -> TargetResult {
1515
target_endian: "little".to_string(),
1616
target_pointer_width: "32".to_string(),
1717
target_c_int_width: "32".to_string(),
18-
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
18+
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
1919
arch: "arm".to_string(),
2020
target_os: "linux".to_string(),
2121
target_env: "musl".to_string(),

src/librustc_target/spec/arm_unknown_linux_musleabihf.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ pub fn target() -> TargetResult {
1515
target_endian: "little".to_string(),
1616
target_pointer_width: "32".to_string(),
1717
target_c_int_width: "32".to_string(),
18-
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
18+
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
1919
arch: "arm".to_string(),
2020
target_os: "linux".to_string(),
2121
target_env: "musl".to_string(),

src/librustc_target/spec/armebv7r_none_eabi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub fn target() -> TargetResult {
99
target_endian: "big".to_string(),
1010
target_pointer_width: "32".to_string(),
1111
target_c_int_width: "32".to_string(),
12-
data_layout: "E-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
12+
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
1313
arch: "arm".to_string(),
1414
target_os: "none".to_string(),
1515
target_env: "".to_string(),

src/librustc_target/spec/armebv7r_none_eabihf.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pub fn target() -> TargetResult {
99
target_endian: "big".to_string(),
1010
target_pointer_width: "32".to_string(),
1111
target_c_int_width: "32".to_string(),
12-
data_layout: "E-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
12+
data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
1313
arch: "arm".to_string(),
1414
target_os: "none".to_string(),
1515
target_env: String::new(),
@@ -21,7 +21,7 @@ pub fn target() -> TargetResult {
2121
linker: Some("rust-lld".to_owned()),
2222
relocation_model: "static".to_string(),
2323
panic_strategy: PanicStrategy::Abort,
24-
features: "+vfp3,+d16,+fp-only-sp".to_string(),
24+
features: "+vfp3,-d32,-fp16".to_string(),
2525
max_atomic_width: Some(32),
2626
abi_blacklist: super::arm_base::abi_blacklist(),
2727
emit_debug_gdb_scripts: false,

src/librustc_target/spec/armv4t_unknown_linux_gnueabi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ pub fn target() -> TargetResult {
77
target_endian: "little".to_string(),
88
target_pointer_width: "32".to_string(),
99
target_c_int_width: "32".to_string(),
10-
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
10+
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
1111
arch: "arm".to_string(),
1212
target_os: "linux".to_string(),
1313
target_env: "gnu".to_string(),

0 commit comments

Comments
 (0)