diff options
| author | Josh Stone <jistone@redhat.com> | 2022-09-29 18:18:26 -0700 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2022-09-29 18:18:26 -0700 |
| commit | 2e7a96448537809bc3718f4d6f7d696ededd1584 (patch) | |
| tree | b2f96b8d10243796c037f7a77938f30035dcf902 /compiler/rustc_codegen_llvm/src | |
| parent | 9c56d9d6fec6262bbb1549cfe466a812ae2c6523 (diff) | |
| download | rust-2e7a96448537809bc3718f4d6f7d696ededd1584.tar.gz rust-2e7a96448537809bc3718f4d6f7d696ededd1584.zip | |
Adjust the s390x data layout for LLVM 16
LLVM [D131158] changed the SystemZ data layout to always set 64-bit vector alignment, which used to be conditional on the "vector" feature. [D131158]: https://reviews.llvm.org/D131158
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index 67ffc7cb951..2ab69d25411 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -154,6 +154,11 @@ pub unsafe fn create_module<'ll>( target_data_layout = target_data_layout.replace("-p10:8:8-p20:8:8", ""); } } + if llvm_version < (16, 0, 0) { + if sess.target.arch == "s390x" { + target_data_layout = target_data_layout.replace("-v128:64", ""); + } + } // Ensure the data-layout values hardcoded remain the defaults. if sess.target.is_builtin { |
