diff options
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/context.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 3ddc7424202..9f6a2ae3ca1 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -104,6 +104,10 @@ fn strip_x86_address_spaces(data_layout: String) -> String { data_layout.replace("-p270:32:32-p271:32:32-p272:64:64-", "-") } +fn strip_powerpc64_vectors(data_layout: String) -> String { + data_layout.replace("-v256:256:256-v512:512:512", "") +} + pub unsafe fn create_module( tcx: TyCtxt<'_>, llcx: &'ll llvm::Context, @@ -119,6 +123,9 @@ pub unsafe fn create_module( { target_data_layout = strip_x86_address_spaces(target_data_layout); } + if llvm_util::get_version() < (12, 0, 0) && sess.target.arch == "powerpc64" { + target_data_layout = strip_powerpc64_vectors(target_data_layout); + } // Ensure the data-layout values hardcoded remain the defaults. if sess.target.is_builtin { |
