diff options
| author | Nikita Popov <npopov@redhat.com> | 2022-02-02 10:16:48 +0100 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2022-02-16 21:15:31 +0100 |
| commit | 70ddd2ff1cbd2bdb887a1052877cfb666a6d92b8 (patch) | |
| tree | eac1c00d1ed1e44dd4a43b31d6ffbd5d03e2b5de /compiler/rustc_codegen_llvm/src | |
| parent | a380581ff87bc095aa0d69993104d3a363dfb327 (diff) | |
| download | rust-70ddd2ff1cbd2bdb887a1052877cfb666a6d92b8.tar.gz rust-70ddd2ff1cbd2bdb887a1052877cfb666a6d92b8.zip | |
Update data layout for wasm32 targets
New address spaces were added in https://reviews.llvm.org/D111154.
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/context.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_codegen_llvm/src/context.rs b/compiler/rustc_codegen_llvm/src/context.rs index eaa76d4ffb6..f8e2d202e66 100644 --- a/compiler/rustc_codegen_llvm/src/context.rs +++ b/compiler/rustc_codegen_llvm/src/context.rs @@ -154,6 +154,9 @@ pub unsafe fn create_module<'ll>( "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(); } + if sess.target.arch == "wasm32" { + target_data_layout = target_data_layout.replace("-p10:8:8-p20:8:8", ""); + } } // Ensure the data-layout values hardcoded remain the defaults. |
