diff options
| author | Alex Rønne Petersen <alex@alexrp.com> | 2025-07-07 03:42:51 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-07 03:42:51 +0200 |
| commit | c96c913bab00bcae42991244381ddcc8b2377552 (patch) | |
| tree | c41c3bcd901a1626afa922ab665488a2d80fb572 /src/Compilation.zig | |
| parent | ef8db03d52e4eeeafa0cc4697703bd711ffda6c3 (diff) | |
| parent | 2bf9ff1b42ada9808aa5e78c758b3475baf8d60b (diff) | |
| download | zig-c96c913bab00bcae42991244381ddcc8b2377552.tar.gz zig-c96c913bab00bcae42991244381ddcc8b2377552.zip | |
Merge pull request #24352 from alexrp/wasi-emulated-libs
`wasi`: Build emulated libraries into `libc.a`
Diffstat (limited to 'src/Compilation.zig')
| -rw-r--r-- | src/Compilation.zig | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/Compilation.zig b/src/Compilation.zig index c890fd1925..c954fc76bc 100644 --- a/src/Compilation.zig +++ b/src/Compilation.zig @@ -234,7 +234,6 @@ fuzzer_lib: ?CrtFile = null, glibc_so_files: ?glibc.BuiltSharedObjects = null, freebsd_so_files: ?freebsd.BuiltSharedObjects = null, netbsd_so_files: ?netbsd.BuiltSharedObjects = null, -wasi_emulated_libs: []const wasi_libc.CrtFile, /// For example `Scrt1.o` and `libc_nonshared.a`. These are populated after building libc from source, /// The set of needed CRT (C runtime) files differs depending on the target and compilation settings. @@ -1567,12 +1566,6 @@ pub const CreateOptions = struct { framework_dirs: []const []const u8 = &[0][]const u8{}, frameworks: []const Framework = &.{}, windows_lib_names: []const []const u8 = &.{}, - /// These correspond to the WASI libc emulated subcomponents including: - /// * process clocks - /// * getpid - /// * mman - /// * signal - wasi_emulated_libs: []const wasi_libc.CrtFile = &.{}, /// This means that if the output mode is an executable it will be a /// Position Independent Executable. If the output mode is not an /// executable this field is ignored. @@ -2055,7 +2048,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil .function_sections = options.function_sections, .data_sections = options.data_sections, .native_system_include_paths = options.native_system_include_paths, - .wasi_emulated_libs = options.wasi_emulated_libs, .force_undefined_symbols = options.force_undefined_symbols, .link_eh_frame_hdr = link_eh_frame_hdr, .global_cc_argv = options.global_cc_argv, @@ -2384,11 +2376,6 @@ pub fn create(gpa: Allocator, arena: Allocator, options: CreateOptions) !*Compil } else if (target.isWasiLibC()) { if (!std.zig.target.canBuildLibC(target)) return error.LibCUnavailable; - for (comp.wasi_emulated_libs) |crt_file| { - comp.queued_jobs.wasi_libc_crt_file[@intFromEnum(crt_file)] = true; - } - comp.link_task_queue.pending_prelink_tasks += @intCast(comp.wasi_emulated_libs.len); - comp.queued_jobs.wasi_libc_crt_file[@intFromEnum(wasi_libc.execModelCrtFile(comp.config.wasi_exec_model))] = true; comp.queued_jobs.wasi_libc_crt_file[@intFromEnum(wasi_libc.CrtFile.libc_a)] = true; comp.link_task_queue.pending_prelink_tasks += 2; |
