diff --git a/emcc.zig b/emcc.zig index 5b66a6f..846b9ff 100644 --- a/emcc.zig +++ b/emcc.zig @@ -123,27 +123,7 @@ fn lastIndexOf(string: []const u8, character: u8) usize { } return string.len - 1; } -// TODO: each zig update, remove this and see if everything still works. -// https://github.com/ziglang/zig/issues/16776 is where the issue is submitted. -fn updateTargetForWeb(target: std.zig.CrossTarget) std.zig.CrossTarget { - // Zig building to emscripten doesn't work, because the Zig standard library - // is missing some things in the C system. "std/c.zig" is missing fd_t, - // which causes compilation to fail. So build to wasi instead, until it gets - // fixed. - return std.zig.CrossTarget{ - .cpu_arch = target.cpu_arch, - .cpu_model = target.cpu_model, - .cpu_features_add = target.cpu_features_add, - .cpu_features_sub = target.cpu_features_sub, - .os_tag = .wasi, - .os_version_min = target.os_version_min, - .os_version_max = target.os_version_max, - .glibc_version = target.glibc_version, - .abi = target.abi, - .dynamic_linker = target.dynamic_linker, - .ofmt = target.ofmt, - }; -} + const webhack_c = \\// Zig adds '__stack_chk_guard', '__stack_chk_fail', and 'errno', \\// which emscripten doesn't actually support.