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>(
207207 }
208208 }
209209
210- // Ensure the data-layout values hardcoded remain the defaults.
210+ // Ensure our hardcoded data-layout values remain the defaults.
211211 {
212212 let tm = crate :: back:: write:: create_informational_target_machine ( tcx. sess , false ) ;
213213 unsafe {
@@ -219,7 +219,12 @@ pub(crate) unsafe fn create_module<'ll>(
219219 str:: from_utf8 ( unsafe { CStr :: from_ptr ( llvm_data_layout) } . to_bytes ( ) )
220220 . expect ( "got a non-UTF8 data-layout from LLVM" ) ;
221221
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 {
223228 tcx. dcx ( ) . emit_err ( crate :: errors:: MismatchedDataLayout {
224229 rustc_target : sess. opts . target_triple . to_string ( ) . as_str ( ) ,
225230 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 {
1717 std : None , // ?
1818 } ,
1919 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 ( ) ,
2122 arch : "powerpc64" . into ( ) ,
2223 options : base,
2324 }
You can’t perform that action at this time.
0 commit comments