Remove unused function

This commit is contained in:
Not-Nik 2024-04-27 17:45:51 +02:00
parent bab16b30a1
commit 57d3f9ef95
No known key found for this signature in database
GPG Key ID: E95F679E3CDD9784

View File

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