std.Target: Define and use lime1 as the baseline CPU model for WebAssembly.

See: https://github.com/WebAssembly/tool-conventions/pull/235

This is not *quite* using the same features as the spec'd lime1 model because
LLVM 19 doesn't have the level of feature granularity that we need for that.
This will be fixed once we upgrade to LLVM 20.

Part of #21818.
This commit is contained in:
Alex Rønne Petersen
2024-11-29 01:31:49 +01:00
parent 206373ca61
commit 280ced66eb
5 changed files with 34 additions and 13 deletions

View File

@@ -1033,6 +1033,20 @@ const llvm_targets = [_]LlvmTarget{
.zig_name = "wasm",
.llvm_name = "WebAssembly",
.td_name = "WebAssembly.td",
.extra_cpus = &.{
.{
.llvm_name = null,
.zig_name = "lime1",
.features = &.{
"bulk_memory",
"extended_const",
"multivalue",
"mutable_globals",
"nontrapping_fptoint",
"sign_ext",
},
},
},
},
.{
.zig_name = "x86",