From 70ddd2ff1cbd2bdb887a1052877cfb666a6d92b8 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 2 Feb 2022 10:16:48 +0100 Subject: Update data layout for wasm32 targets New address spaces were added in https://reviews.llvm.org/D111154. --- compiler/rustc_codegen_llvm/src/context.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'compiler/rustc_codegen_llvm/src/context.rs') 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. -- cgit 1.4.1-3-g733a5