Update data layout for wasm32 targets

New address spaces were added in https://reviews.llvm.org/D111154.
This commit is contained in:
Nikita Popov 2022-02-02 10:16:48 +01:00 committed by Nikita Popov
parent a380581ff8
commit 70ddd2ff1c
4 changed files with 7 additions and 3 deletions

View file

@ -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.