File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
rustc_target/src/spec/targets Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ pub(crate) unsafe fn create_module<'ll>(
207
207
}
208
208
}
209
209
210
- // Ensure the data-layout values hardcoded remain the defaults.
210
+ // Ensure our hardcoded data-layout values remain the defaults.
211
211
{
212
212
let tm = crate :: back:: write:: create_informational_target_machine ( tcx. sess , false ) ;
213
213
unsafe {
@@ -219,7 +219,12 @@ pub(crate) unsafe fn create_module<'ll>(
219
219
str:: from_utf8 ( unsafe { CStr :: from_ptr ( llvm_data_layout) } . to_bytes ( ) )
220
220
. expect ( "got a non-UTF8 data-layout from LLVM" ) ;
221
221
222
- if target_data_layout != llvm_data_layout {
222
+ if tcx. sess . target . os == "aix" {
223
+ // we committed a travesty here
224
+ if target_data_layout == llvm_data_layout {
225
+ bug ! ( "LLVM got fixed, please remove this exception in cg_llvm!" ) ;
226
+ }
227
+ } else if target_data_layout != llvm_data_layout {
223
228
tcx. dcx ( ) . emit_err ( crate :: errors:: MismatchedDataLayout {
224
229
rustc_target : sess. opts . target_triple . to_string ( ) . as_str ( ) ,
225
230
rustc_layout : target_data_layout. as_str ( ) ,
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ pub(crate) fn target() -> Target {
17
17
std : None , // ?
18
18
} ,
19
19
pointer_width : 64 ,
20
- data_layout : "E-m:a-Fi64-i64:64-i128:128-n32:64-S128-v256:256:256-v512:512:512" . into ( ) ,
20
+ data_layout : "E-m:a-Fi64-i64:64-f64:32:64-i128:128-n32:64-S128-v256:256:256-v512:512:512"
21
+ . into ( ) ,
21
22
arch : "powerpc64" . into ( ) ,
22
23
options : base,
23
24
}
You can’t perform that action at this time.
0 commit comments