mirror of
https://github.com/ziglang/zig.git
synced 2026-02-12 20:37:54 +00:00
add dev env for wasm
with this I get 5s compilations
This commit is contained in:
parent
7879d2cf41
commit
4a4fb16c27
12
src/dev.zig
12
src/dev.zig
@ -30,6 +30,10 @@ pub const Env = enum {
|
||||
/// - `zig build-* -fno-llvm -fno-lld -target riscv64-linux`
|
||||
@"riscv64-linux",
|
||||
|
||||
/// - sema
|
||||
/// - `zig build-* -fno-llvm -fno-lld -target wasm32-* --listen=-`
|
||||
wasm,
|
||||
|
||||
pub inline fn supports(comptime dev_env: Env, comptime feature: Feature) bool {
|
||||
return switch (dev_env) {
|
||||
.full => true,
|
||||
@ -144,6 +148,14 @@ pub const Env = enum {
|
||||
=> true,
|
||||
else => Env.sema.supports(feature),
|
||||
},
|
||||
.wasm => switch (feature) {
|
||||
.stdio_listen,
|
||||
.incremental,
|
||||
.wasm_backend,
|
||||
.wasm_linker,
|
||||
=> true,
|
||||
else => Env.sema.supports(feature),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user