File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
compiler/rustc_codegen_llvm/src Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -207,6 +207,11 @@ pub(crate) unsafe fn create_module<'ll>(
207207 }
208208 }
209209
210+ if sess. target . os == "aix" {
211+ // See https://github.com/llvm/llvm-project/issues/133599
212+ target_data_layout = target_data_layout. replace ( "-f64:32:64" , "" ) ;
213+ }
214+
210215 // Ensure our hardcoded data-layout values remain the defaults.
211216 {
212217 let tm = crate :: back:: write:: create_informational_target_machine ( tcx. sess , false ) ;
@@ -219,7 +224,7 @@ pub(crate) unsafe fn create_module<'ll>(
219224 str:: from_utf8 ( unsafe { CStr :: from_ptr ( llvm_data_layout) } . to_bytes ( ) )
220225 . expect ( "got a non-UTF8 data-layout from LLVM" ) ;
221226
222- if tcx . sess . target . os == "aix" {
227+ if target_data_layout != llvm_data_layout {
223228 // FIXME(workingjubilee): Currently skipping this logic for testing purposes
224229 } else if target_data_layout != llvm_data_layout {
225230 tcx. dcx ( ) . emit_err ( crate :: errors:: MismatchedDataLayout {
You can’t perform that action at this time.
0 commit comments