aboutsummaryrefslogtreecommitdiff
path: root/src/main.zig
diff options
context:
space:
mode:
authorAlex Rønne Petersen <alex@alexrp.com>2025-07-06 20:05:18 +0200
committerAlex Rønne Petersen <alex@alexrp.com>2025-07-06 20:05:18 +0200
commit1f1082e36d3bf9cda4e61cae223e9903ae6fc4ce (patch)
tree0a2e45cda56056abd36b299ccb5bb52763d7d73f /src/main.zig
parentb461d07a5464aec86c533434dab0b58edfffb331 (diff)
downloadzig-1f1082e36d3bf9cda4e61cae223e9903ae6fc4ce.tar.gz
zig-1f1082e36d3bf9cda4e61cae223e9903ae6fc4ce.zip
wasi: Build emulated libraries into libc.a
This matches what we do for small helper libraries like this in MinGW-w64. It simplifies the compiler a bit, and also means the build system doesn't have to treat these library names specially. Closes #24325.
Diffstat (limited to 'src/main.zig')
-rw-r--r--src/main.zig13
1 files changed, 0 insertions, 13 deletions
diff --git a/src/main.zig b/src/main.zig
index 0456122405..7b7d5be59a 100644
--- a/src/main.zig
+++ b/src/main.zig
@@ -972,8 +972,6 @@ fn buildOutputType(
.windows_libs = .empty,
.link_inputs = .empty,
- .wasi_emulated_libs = .{},
-
.c_source_files = .{},
.rc_source_files = .{},
@@ -3406,7 +3404,6 @@ fn buildOutputType(
.framework_dirs = create_module.framework_dirs.items,
.frameworks = resolved_frameworks.items,
.windows_lib_names = create_module.windows_libs.keys(),
- .wasi_emulated_libs = create_module.wasi_emulated_libs.items,
.want_compiler_rt = want_compiler_rt,
.want_ubsan_rt = want_ubsan_rt,
.hash_style = hash_style,
@@ -3687,8 +3684,6 @@ const CreateModule = struct {
/// output. Allocated with gpa.
link_inputs: std.ArrayListUnmanaged(link.Input),
- wasi_emulated_libs: std.ArrayListUnmanaged(wasi_libc.CrtFile),
-
c_source_files: std.ArrayListUnmanaged(Compilation.CSourceFile),
rc_source_files: std.ArrayListUnmanaged(Compilation.RcSourceFile),
@@ -3819,14 +3814,6 @@ fn createModule(
.name_query => |nq| {
const lib_name = nq.name;
- if (target.os.tag == .wasi) {
- if (wasi_libc.getEmulatedLibCrtFile(lib_name)) |crt_file| {
- try create_module.wasi_emulated_libs.append(arena, crt_file);
- create_module.opts.link_libc = true;
- continue;
- }
- }
-
if (std.zig.target.isLibCLibName(target, lib_name)) {
create_module.opts.link_libc = true;
continue;