move wasm target struct around to avoid analyzing wasm file on non-wasm

This commit is contained in:
Mitchell Hashimoto
2022-12-31 09:04:11 -08:00
parent 8b6128ddfc
commit e8a1fe4d87
5 changed files with 20 additions and 15 deletions

View File

@@ -21,8 +21,8 @@ pub const State = @import("renderer/State.zig");
/// The implementation to use for the renderer. This is comptime chosen
/// so that every build has exactly one renderer implementation.
const wasm = @import("os/wasm.zig");
pub const Renderer = if (wasm.target) |target| switch (target) {
const wasm_target = @import("os/wasm/target.zig");
pub const Renderer = if (wasm_target.target) |target| switch (target) {
.browser => WebGL,
} else switch (builtin.os.tag) {
.macos => Metal,