zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

blob b61ba509 (53337B) - Raw


      1 const std = @import("std");
      2 const mem = std.mem;
      3 const path = std.fs.path;
      4 
      5 const Allocator = std.mem.Allocator;
      6 const Compilation = @import("Compilation.zig");
      7 const build_options = @import("build_options");
      8 const target_util = @import("target.zig");
      9 const musl = @import("musl.zig");
     10 
     11 pub const CRTFile = enum {
     12     crt1_o,
     13     crt1_reactor_o,
     14     crt1_command_o,
     15     libc_a,
     16     libwasi_emulated_process_clocks_a,
     17     libwasi_emulated_getpid_a,
     18     libwasi_emulated_mman_a,
     19     libwasi_emulated_signal_a,
     20 };
     21 
     22 pub fn getEmulatedLibCRTFile(lib_name: []const u8) ?CRTFile {
     23     if (mem.eql(u8, lib_name, "wasi-emulated-process-clocks")) {
     24         return .libwasi_emulated_process_clocks_a;
     25     }
     26     if (mem.eql(u8, lib_name, "wasi-emulated-getpid")) {
     27         return .libwasi_emulated_getpid_a;
     28     }
     29     if (mem.eql(u8, lib_name, "wasi-emulated-mman")) {
     30         return .libwasi_emulated_mman_a;
     31     }
     32     if (mem.eql(u8, lib_name, "wasi-emulated-signal")) {
     33         return .libwasi_emulated_signal_a;
     34     }
     35     return null;
     36 }
     37 
     38 pub fn emulatedLibCRFileLibName(crt_file: CRTFile) []const u8 {
     39     return switch (crt_file) {
     40         .libwasi_emulated_process_clocks_a => "libwasi-emulated-process-clocks.a",
     41         .libwasi_emulated_getpid_a => "libwasi-emulated-getpid.a",
     42         .libwasi_emulated_mman_a => "libwasi-emulated-mman.a",
     43         .libwasi_emulated_signal_a => "libwasi-emulated-signal.a",
     44         else => unreachable,
     45     };
     46 }
     47 
     48 pub fn buildCRTFile(comp: *Compilation, crt_file: CRTFile) !void {
     49     if (!build_options.have_llvm) {
     50         return error.ZigCompilerNotBuiltWithLLVMExtensions;
     51     }
     52 
     53     const gpa = comp.gpa;
     54     var arena_allocator = std.heap.ArenaAllocator.init(gpa);
     55     defer arena_allocator.deinit();
     56     const arena = &arena_allocator.allocator;
     57 
     58     switch (crt_file) {
     59         .crt1_o => {
     60             var args = std.ArrayList([]const u8).init(arena);
     61             try addCCArgs(comp, arena, &args, false);
     62             try addLibcBottomHalfIncludes(comp, arena, &args);
     63             return comp.build_crt_file("crt1", .Obj, &[1]Compilation.CSourceFile{
     64                 .{
     65                     .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
     66                         "libc", try sanitize(arena, crt1_src_file),
     67                     }),
     68                     .extra_flags = args.items,
     69                 },
     70             });
     71         },
     72         .crt1_reactor_o => {
     73             var args = std.ArrayList([]const u8).init(arena);
     74             try addCCArgs(comp, arena, &args, false);
     75             try addLibcBottomHalfIncludes(comp, arena, &args);
     76             return comp.build_crt_file("crt1-reactor", .Obj, &[1]Compilation.CSourceFile{
     77                 .{
     78                     .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
     79                         "libc", try sanitize(arena, crt1_reactor_src_file),
     80                     }),
     81                     .extra_flags = args.items,
     82                 },
     83             });
     84         },
     85         .crt1_command_o => {
     86             var args = std.ArrayList([]const u8).init(arena);
     87             try addCCArgs(comp, arena, &args, false);
     88             try addLibcBottomHalfIncludes(comp, arena, &args);
     89             return comp.build_crt_file("crt1-command", .Obj, &[1]Compilation.CSourceFile{
     90                 .{
     91                     .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
     92                         "libc", try sanitize(arena, crt1_command_src_file),
     93                     }),
     94                     .extra_flags = args.items,
     95                 },
     96             });
     97         },
     98         .libc_a => {
     99             var libc_sources = std.ArrayList(Compilation.CSourceFile).init(arena);
    100 
    101             {
    102                 // Compile dlmalloc.
    103                 var args = std.ArrayList([]const u8).init(arena);
    104                 try addCCArgs(comp, arena, &args, true);
    105                 try args.appendSlice(&[_][]const u8{
    106                     "-I",
    107                     try comp.zig_lib_directory.join(arena, &[_][]const u8{
    108                         "libc",
    109                         "wasi",
    110                         "dlmalloc",
    111                         "include",
    112                     }),
    113                 });
    114 
    115                 for (dlmalloc_src_files) |file_path| {
    116                     try libc_sources.append(.{
    117                         .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
    118                             "libc", try sanitize(arena, file_path),
    119                         }),
    120                         .extra_flags = args.items,
    121                     });
    122                 }
    123             }
    124 
    125             {
    126                 // Compile libc-bottom-half.
    127                 var args = std.ArrayList([]const u8).init(arena);
    128                 try addCCArgs(comp, arena, &args, true);
    129                 try addLibcBottomHalfIncludes(comp, arena, &args);
    130 
    131                 for (libc_bottom_half_src_files) |file_path| {
    132                     try libc_sources.append(.{
    133                         .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
    134                             "libc", try sanitize(arena, file_path),
    135                         }),
    136                         .extra_flags = args.items,
    137                     });
    138                 }
    139             }
    140 
    141             {
    142                 // Compile libc-top-half.
    143                 var args = std.ArrayList([]const u8).init(arena);
    144                 try addCCArgs(comp, arena, &args, true);
    145                 try addLibcTopHalfIncludes(comp, arena, &args);
    146 
    147                 for (libc_top_half_src_files) |file_path| {
    148                     try libc_sources.append(.{
    149                         .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
    150                             "libc", try sanitize(arena, file_path),
    151                         }),
    152                         .extra_flags = args.items,
    153                     });
    154                 }
    155             }
    156 
    157             try comp.build_crt_file("c", .Lib, libc_sources.items);
    158         },
    159         .libwasi_emulated_process_clocks_a => {
    160             var args = std.ArrayList([]const u8).init(arena);
    161             try addCCArgs(comp, arena, &args, true);
    162             try addLibcBottomHalfIncludes(comp, arena, &args);
    163 
    164             var emu_clocks_sources = std.ArrayList(Compilation.CSourceFile).init(arena);
    165             for (emulated_process_clocks_src_files) |file_path| {
    166                 try emu_clocks_sources.append(.{
    167                     .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
    168                         "libc", try sanitize(arena, file_path),
    169                     }),
    170                     .extra_flags = args.items,
    171                 });
    172             }
    173             try comp.build_crt_file("wasi-emulated-process-clocks", .Lib, emu_clocks_sources.items);
    174         },
    175         .libwasi_emulated_getpid_a => {
    176             var args = std.ArrayList([]const u8).init(arena);
    177             try addCCArgs(comp, arena, &args, true);
    178             try addLibcBottomHalfIncludes(comp, arena, &args);
    179 
    180             var emu_getpid_sources = std.ArrayList(Compilation.CSourceFile).init(arena);
    181             for (emulated_getpid_src_files) |file_path| {
    182                 try emu_getpid_sources.append(.{
    183                     .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
    184                         "libc", try sanitize(arena, file_path),
    185                     }),
    186                     .extra_flags = args.items,
    187                 });
    188             }
    189             try comp.build_crt_file("wasi-emulated-getpid", .Lib, emu_getpid_sources.items);
    190         },
    191         .libwasi_emulated_mman_a => {
    192             var args = std.ArrayList([]const u8).init(arena);
    193             try addCCArgs(comp, arena, &args, true);
    194             try addLibcBottomHalfIncludes(comp, arena, &args);
    195 
    196             var emu_mman_sources = std.ArrayList(Compilation.CSourceFile).init(arena);
    197             for (emulated_mman_src_files) |file_path| {
    198                 try emu_mman_sources.append(.{
    199                     .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
    200                         "libc", try sanitize(arena, file_path),
    201                     }),
    202                     .extra_flags = args.items,
    203                 });
    204             }
    205             try comp.build_crt_file("wasi-emulated-mman", .Lib, emu_mman_sources.items);
    206         },
    207         .libwasi_emulated_signal_a => {
    208             var emu_signal_sources = std.ArrayList(Compilation.CSourceFile).init(arena);
    209 
    210             {
    211                 var args = std.ArrayList([]const u8).init(arena);
    212                 try addCCArgs(comp, arena, &args, true);
    213 
    214                 for (emulated_signal_bottom_half_src_files) |file_path| {
    215                     try emu_signal_sources.append(.{
    216                         .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
    217                             "libc", try sanitize(arena, file_path),
    218                         }),
    219                         .extra_flags = args.items,
    220                     });
    221                 }
    222             }
    223 
    224             {
    225                 var args = std.ArrayList([]const u8).init(arena);
    226                 try addCCArgs(comp, arena, &args, true);
    227                 try addLibcTopHalfIncludes(comp, arena, &args);
    228                 try args.append("-D_WASI_EMULATED_SIGNAL");
    229 
    230                 for (emulated_signal_top_half_src_files) |file_path| {
    231                     try emu_signal_sources.append(.{
    232                         .src_path = try comp.zig_lib_directory.join(arena, &[_][]const u8{
    233                             "libc", try sanitize(arena, file_path),
    234                         }),
    235                         .extra_flags = args.items,
    236                     });
    237                 }
    238             }
    239 
    240             try comp.build_crt_file("wasi-emulated-signal", .Lib, emu_signal_sources.items);
    241         },
    242     }
    243 }
    244 
    245 fn sanitize(arena: *Allocator, file_path: []const u8) ![]const u8 {
    246     // TODO do this at comptime on the comptime data rather than at runtime
    247     // probably best to wait until self-hosted is done and our comptime execution
    248     // is faster and uses less memory.
    249     const out_path = if (path.sep != '/') blk: {
    250         const mutable_file_path = try arena.dupe(u8, file_path);
    251         for (mutable_file_path) |*c| {
    252             if (c.* == '/') {
    253                 c.* = path.sep;
    254             }
    255         }
    256         break :blk mutable_file_path;
    257     } else file_path;
    258     return out_path;
    259 }
    260 
    261 fn addCCArgs(
    262     comp: *Compilation,
    263     arena: *Allocator,
    264     args: *std.ArrayList([]const u8),
    265     want_O3: bool,
    266 ) error{OutOfMemory}!void {
    267     const target = comp.getTarget();
    268     const arch_name = musl.archName(target.cpu.arch);
    269     const os_name = @tagName(target.os.tag);
    270     const triple = try std.fmt.allocPrint(arena, "{s}-{s}-musl", .{ arch_name, os_name });
    271     const o_arg = if (want_O3) "-O3" else "-Os";
    272 
    273     try args.appendSlice(&[_][]const u8{
    274         "-std=gnu17",
    275         "-fno-trapping-math",
    276         "-fno-stack-protector",
    277         "-w", // ignore all warnings
    278 
    279         o_arg,
    280 
    281         "-mthread-model",
    282         "single",
    283 
    284         "-isysroot",
    285         "/",
    286 
    287         "-iwithsysroot",
    288         try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libc", "include", triple }),
    289     });
    290 }
    291 
    292 fn addLibcBottomHalfIncludes(
    293     comp: *Compilation,
    294     arena: *Allocator,
    295     args: *std.ArrayList([]const u8),
    296 ) error{OutOfMemory}!void {
    297     try args.appendSlice(&[_][]const u8{
    298         "-I",
    299         try comp.zig_lib_directory.join(arena, &[_][]const u8{
    300             "libc",
    301             "wasi",
    302             "libc-bottom-half",
    303             "headers",
    304             "private",
    305         }),
    306 
    307         "-I",
    308         try comp.zig_lib_directory.join(arena, &[_][]const u8{
    309             "libc",
    310             "wasi",
    311             "libc-bottom-half",
    312             "cloudlibc",
    313             "src",
    314             "include",
    315         }),
    316 
    317         "-I",
    318         try comp.zig_lib_directory.join(arena, &[_][]const u8{
    319             "libc",
    320             "wasi",
    321             "libc-bottom-half",
    322             "cloudlibc",
    323             "src",
    324         }),
    325     });
    326 }
    327 
    328 fn addLibcTopHalfIncludes(
    329     comp: *Compilation,
    330     arena: *Allocator,
    331     args: *std.ArrayList([]const u8),
    332 ) error{OutOfMemory}!void {
    333     try args.appendSlice(&[_][]const u8{
    334         "-I",
    335         try comp.zig_lib_directory.join(arena, &[_][]const u8{
    336             "libc",
    337             "wasi",
    338             "libc-top-half",
    339             "musl",
    340             "src",
    341             "include",
    342         }),
    343 
    344         "-I",
    345         try comp.zig_lib_directory.join(arena, &[_][]const u8{
    346             "libc",
    347             "wasi",
    348             "libc-top-half",
    349             "musl",
    350             "src",
    351             "internal",
    352         }),
    353 
    354         "-I",
    355         try comp.zig_lib_directory.join(arena, &[_][]const u8{
    356             "libc",
    357             "wasi",
    358             "libc-top-half",
    359             "musl",
    360             "arch",
    361             "wasm32",
    362         }),
    363 
    364         "-I",
    365         try comp.zig_lib_directory.join(arena, &[_][]const u8{
    366             "libc",
    367             "wasi",
    368             "libc-top-half",
    369             "musl",
    370             "arch",
    371             "generic",
    372         }),
    373 
    374         "-I",
    375         try comp.zig_lib_directory.join(arena, &[_][]const u8{
    376             "libc",
    377             "wasi",
    378             "libc-top-half",
    379             "headers",
    380             "private",
    381         }),
    382     });
    383 }
    384 
    385 const dlmalloc_src_files = [_][]const u8{
    386     "wasi/dlmalloc/src/dlmalloc.c",
    387 };
    388 
    389 const libc_bottom_half_src_files = [_][]const u8{
    390     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/closedir.c",
    391     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/dirfd.c",
    392     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/fdopendir.c",
    393     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/readdir.c",
    394     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/scandirat.c",
    395     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/telldir.c",
    396     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/fdclosedir.c",
    397     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/opendirat.c",
    398     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/rewinddir.c",
    399     "wasi/libc-bottom-half/cloudlibc/src/libc/dirent/seekdir.c",
    400     "wasi/libc-bottom-half/cloudlibc/src/libc/errno/errno.c",
    401     "wasi/libc-bottom-half/cloudlibc/src/libc/fcntl/fcntl.c",
    402     "wasi/libc-bottom-half/cloudlibc/src/libc/fcntl/openat.c",
    403     "wasi/libc-bottom-half/cloudlibc/src/libc/fcntl/posix_fadvise.c",
    404     "wasi/libc-bottom-half/cloudlibc/src/libc/fcntl/posix_fallocate.c",
    405     "wasi/libc-bottom-half/cloudlibc/src/libc/poll/poll.c",
    406     "wasi/libc-bottom-half/cloudlibc/src/libc/sched/sched_yield.c",
    407     "wasi/libc-bottom-half/cloudlibc/src/libc/stdio/renameat.c",
    408     "wasi/libc-bottom-half/cloudlibc/src/libc/stdlib/_Exit.c",
    409     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/ioctl/ioctl.c",
    410     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/select/pselect.c",
    411     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/select/select.c",
    412     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/socket/getsockopt.c",
    413     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/socket/recv.c",
    414     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/socket/send.c",
    415     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/socket/shutdown.c",
    416     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/fstatat.c",
    417     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/fstat.c",
    418     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/futimens.c",
    419     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/mkdirat.c",
    420     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/stat/utimensat.c",
    421     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/time/gettimeofday.c",
    422     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/uio/preadv.c",
    423     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/uio/pwritev.c",
    424     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/uio/readv.c",
    425     "wasi/libc-bottom-half/cloudlibc/src/libc/sys/uio/writev.c",
    426     "wasi/libc-bottom-half/cloudlibc/src/libc/time/clock_getres.c",
    427     "wasi/libc-bottom-half/cloudlibc/src/libc/time/clock_gettime.c",
    428     "wasi/libc-bottom-half/cloudlibc/src/libc/time/CLOCK_MONOTONIC.c",
    429     "wasi/libc-bottom-half/cloudlibc/src/libc/time/clock_nanosleep.c",
    430     "wasi/libc-bottom-half/cloudlibc/src/libc/time/CLOCK_PROCESS_CPUTIME_ID.c",
    431     "wasi/libc-bottom-half/cloudlibc/src/libc/time/CLOCK_REALTIME.c",
    432     "wasi/libc-bottom-half/cloudlibc/src/libc/time/CLOCK_THREAD_CPUTIME_ID.c",
    433     "wasi/libc-bottom-half/cloudlibc/src/libc/time/nanosleep.c",
    434     "wasi/libc-bottom-half/cloudlibc/src/libc/time/time.c",
    435     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/close.c",
    436     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/faccessat.c",
    437     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/fdatasync.c",
    438     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/fsync.c",
    439     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/ftruncate.c",
    440     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/linkat.c",
    441     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/lseek.c",
    442     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/pread.c",
    443     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/pwrite.c",
    444     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/read.c",
    445     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/readlinkat.c",
    446     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/sleep.c",
    447     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/symlinkat.c",
    448     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/unlinkat.c",
    449     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/usleep.c",
    450     "wasi/libc-bottom-half/cloudlibc/src/libc/unistd/write.c",
    451     "wasi/libc-bottom-half/sources/abort.c",
    452     "wasi/libc-bottom-half/sources/at_fdcwd.c",
    453     "wasi/libc-bottom-half/sources/complex-builtins.c",
    454     "wasi/libc-bottom-half/sources/environ.c",
    455     "wasi/libc-bottom-half/sources/errno.c",
    456     "wasi/libc-bottom-half/sources/getcwd.c",
    457     "wasi/libc-bottom-half/sources/getentropy.c",
    458     "wasi/libc-bottom-half/sources/isatty.c",
    459     "wasi/libc-bottom-half/sources/__main_argc_argv.c",
    460     "wasi/libc-bottom-half/sources/__main_void.c",
    461     "wasi/libc-bottom-half/sources/__original_main.c",
    462     "wasi/libc-bottom-half/sources/posix.c",
    463     "wasi/libc-bottom-half/sources/preopens.c",
    464     "wasi/libc-bottom-half/sources/reallocarray.c",
    465     "wasi/libc-bottom-half/sources/sbrk.c",
    466     "wasi/libc-bottom-half/sources/truncate.c",
    467     "wasi/libc-bottom-half/sources/__wasilibc_fd_renumber.c",
    468     "wasi/libc-bottom-half/sources/__wasilibc_initialize_environ.c",
    469     "wasi/libc-bottom-half/sources/__wasilibc_real.c",
    470     "wasi/libc-bottom-half/sources/__wasilibc_rmdirat.c",
    471     "wasi/libc-bottom-half/sources/__wasilibc_tell.c",
    472     "wasi/libc-bottom-half/sources/__wasilibc_unlinkat.c",
    473     "wasi/libc-bottom-half/sources/math/fmin-fmax.c",
    474     "wasi/libc-bottom-half/sources/math/math-builtins.c",
    475     // TODO apparently, due to a bug in LLD, the weak refs are garbled
    476     // unless chdir.c is last in the archive
    477     // https://reviews.llvm.org/D85567
    478     "wasi/libc-bottom-half/sources/chdir.c",
    479 };
    480 
    481 const libc_top_half_src_files = [_][]const u8{
    482     "wasi/libc-top-half/musl/src/misc/a64l.c",
    483     "wasi/libc-top-half/musl/src/misc/basename.c",
    484     "wasi/libc-top-half/musl/src/misc/dirname.c",
    485     "wasi/libc-top-half/musl/src/misc/ffs.c",
    486     "wasi/libc-top-half/musl/src/misc/ffsl.c",
    487     "wasi/libc-top-half/musl/src/misc/ffsll.c",
    488     "wasi/libc-top-half/musl/src/misc/fmtmsg.c",
    489     "wasi/libc-top-half/musl/src/misc/getdomainname.c",
    490     "wasi/libc-top-half/musl/src/misc/gethostid.c",
    491     "wasi/libc-top-half/musl/src/misc/getopt.c",
    492     "wasi/libc-top-half/musl/src/misc/getopt_long.c",
    493     "wasi/libc-top-half/musl/src/misc/getsubopt.c",
    494     "wasi/libc-top-half/musl/src/misc/uname.c",
    495     "wasi/libc-top-half/musl/src/misc/nftw.c",
    496     "wasi/libc-top-half/musl/src/errno/strerror.c",
    497     "wasi/libc-top-half/musl/src/network/htonl.c",
    498     "wasi/libc-top-half/musl/src/network/htons.c",
    499     "wasi/libc-top-half/musl/src/network/ntohl.c",
    500     "wasi/libc-top-half/musl/src/network/ntohs.c",
    501     "wasi/libc-top-half/musl/src/network/inet_ntop.c",
    502     "wasi/libc-top-half/musl/src/network/inet_pton.c",
    503     "wasi/libc-top-half/musl/src/network/inet_aton.c",
    504     "wasi/libc-top-half/musl/src/network/in6addr_any.c",
    505     "wasi/libc-top-half/musl/src/network/in6addr_loopback.c",
    506     "wasi/libc-top-half/musl/src/fenv/fenv.c",
    507     "wasi/libc-top-half/musl/src/fenv/fesetround.c",
    508     "wasi/libc-top-half/musl/src/fenv/feupdateenv.c",
    509     "wasi/libc-top-half/musl/src/fenv/fesetexceptflag.c",
    510     "wasi/libc-top-half/musl/src/fenv/fegetexceptflag.c",
    511     "wasi/libc-top-half/musl/src/fenv/feholdexcept.c",
    512     "wasi/libc-top-half/musl/src/exit/exit.c",
    513     "wasi/libc-top-half/musl/src/exit/atexit.c",
    514     "wasi/libc-top-half/musl/src/exit/assert.c",
    515     "wasi/libc-top-half/musl/src/exit/quick_exit.c",
    516     "wasi/libc-top-half/musl/src/exit/at_quick_exit.c",
    517     "wasi/libc-top-half/musl/src/time/strftime.c",
    518     "wasi/libc-top-half/musl/src/time/asctime.c",
    519     "wasi/libc-top-half/musl/src/time/asctime_r.c",
    520     "wasi/libc-top-half/musl/src/time/ctime.c",
    521     "wasi/libc-top-half/musl/src/time/ctime_r.c",
    522     "wasi/libc-top-half/musl/src/time/wcsftime.c",
    523     "wasi/libc-top-half/musl/src/time/strptime.c",
    524     "wasi/libc-top-half/musl/src/time/difftime.c",
    525     "wasi/libc-top-half/musl/src/time/timegm.c",
    526     "wasi/libc-top-half/musl/src/time/ftime.c",
    527     "wasi/libc-top-half/musl/src/time/gmtime.c",
    528     "wasi/libc-top-half/musl/src/time/gmtime_r.c",
    529     "wasi/libc-top-half/musl/src/time/timespec_get.c",
    530     "wasi/libc-top-half/musl/src/time/getdate.c",
    531     "wasi/libc-top-half/musl/src/time/localtime.c",
    532     "wasi/libc-top-half/musl/src/time/localtime_r.c",
    533     "wasi/libc-top-half/musl/src/time/mktime.c",
    534     "wasi/libc-top-half/musl/src/time/__tm_to_secs.c",
    535     "wasi/libc-top-half/musl/src/time/__month_to_secs.c",
    536     "wasi/libc-top-half/musl/src/time/__secs_to_tm.c",
    537     "wasi/libc-top-half/musl/src/time/__year_to_secs.c",
    538     "wasi/libc-top-half/musl/src/time/__tz.c",
    539     "wasi/libc-top-half/musl/src/fcntl/creat.c",
    540     "wasi/libc-top-half/musl/src/dirent/alphasort.c",
    541     "wasi/libc-top-half/musl/src/dirent/versionsort.c",
    542     "wasi/libc-top-half/musl/src/env/clearenv.c",
    543     "wasi/libc-top-half/musl/src/env/getenv.c",
    544     "wasi/libc-top-half/musl/src/env/putenv.c",
    545     "wasi/libc-top-half/musl/src/env/setenv.c",
    546     "wasi/libc-top-half/musl/src/env/unsetenv.c",
    547     "wasi/libc-top-half/musl/src/unistd/posix_close.c",
    548     "wasi/libc-top-half/musl/src/internal/defsysinfo.c",
    549     "wasi/libc-top-half/musl/src/internal/floatscan.c",
    550     "wasi/libc-top-half/musl/src/internal/intscan.c",
    551     "wasi/libc-top-half/musl/src/internal/libc.c",
    552     "wasi/libc-top-half/musl/src/internal/shgetc.c",
    553     "wasi/libc-top-half/musl/src/stdio/asprintf.c",
    554     "wasi/libc-top-half/musl/src/stdio/clearerr.c",
    555     "wasi/libc-top-half/musl/src/stdio/dprintf.c",
    556     "wasi/libc-top-half/musl/src/stdio/ext2.c",
    557     "wasi/libc-top-half/musl/src/stdio/ext.c",
    558     "wasi/libc-top-half/musl/src/stdio/fclose.c",
    559     "wasi/libc-top-half/musl/src/stdio/__fclose_ca.c",
    560     "wasi/libc-top-half/musl/src/stdio/__fdopen.c",
    561     "wasi/libc-top-half/musl/src/stdio/feof.c",
    562     "wasi/libc-top-half/musl/src/stdio/ferror.c",
    563     "wasi/libc-top-half/musl/src/stdio/fflush.c",
    564     "wasi/libc-top-half/musl/src/stdio/fgetc.c",
    565     "wasi/libc-top-half/musl/src/stdio/fgetln.c",
    566     "wasi/libc-top-half/musl/src/stdio/fgetpos.c",
    567     "wasi/libc-top-half/musl/src/stdio/fgets.c",
    568     "wasi/libc-top-half/musl/src/stdio/fgetwc.c",
    569     "wasi/libc-top-half/musl/src/stdio/fgetws.c",
    570     "wasi/libc-top-half/musl/src/stdio/fileno.c",
    571     "wasi/libc-top-half/musl/src/stdio/fmemopen.c",
    572     "wasi/libc-top-half/musl/src/stdio/__fmodeflags.c",
    573     "wasi/libc-top-half/musl/src/stdio/fopen.c",
    574     "wasi/libc-top-half/musl/src/stdio/fopencookie.c",
    575     "wasi/libc-top-half/musl/src/stdio/__fopen_rb_ca.c",
    576     "wasi/libc-top-half/musl/src/stdio/fprintf.c",
    577     "wasi/libc-top-half/musl/src/stdio/fputc.c",
    578     "wasi/libc-top-half/musl/src/stdio/fputs.c",
    579     "wasi/libc-top-half/musl/src/stdio/fputwc.c",
    580     "wasi/libc-top-half/musl/src/stdio/fputws.c",
    581     "wasi/libc-top-half/musl/src/stdio/fread.c",
    582     "wasi/libc-top-half/musl/src/stdio/freopen.c",
    583     "wasi/libc-top-half/musl/src/stdio/fscanf.c",
    584     "wasi/libc-top-half/musl/src/stdio/fseek.c",
    585     "wasi/libc-top-half/musl/src/stdio/fsetpos.c",
    586     "wasi/libc-top-half/musl/src/stdio/ftell.c",
    587     "wasi/libc-top-half/musl/src/stdio/fwide.c",
    588     "wasi/libc-top-half/musl/src/stdio/fwprintf.c",
    589     "wasi/libc-top-half/musl/src/stdio/fwrite.c",
    590     "wasi/libc-top-half/musl/src/stdio/fwscanf.c",
    591     "wasi/libc-top-half/musl/src/stdio/getc.c",
    592     "wasi/libc-top-half/musl/src/stdio/getchar.c",
    593     "wasi/libc-top-half/musl/src/stdio/getchar_unlocked.c",
    594     "wasi/libc-top-half/musl/src/stdio/getc_unlocked.c",
    595     "wasi/libc-top-half/musl/src/stdio/getdelim.c",
    596     "wasi/libc-top-half/musl/src/stdio/getline.c",
    597     "wasi/libc-top-half/musl/src/stdio/getw.c",
    598     "wasi/libc-top-half/musl/src/stdio/getwc.c",
    599     "wasi/libc-top-half/musl/src/stdio/getwchar.c",
    600     "wasi/libc-top-half/musl/src/stdio/ofl_add.c",
    601     "wasi/libc-top-half/musl/src/stdio/ofl.c",
    602     "wasi/libc-top-half/musl/src/stdio/open_memstream.c",
    603     "wasi/libc-top-half/musl/src/stdio/open_wmemstream.c",
    604     "wasi/libc-top-half/musl/src/stdio/__overflow.c",
    605     "wasi/libc-top-half/musl/src/stdio/perror.c",
    606     "wasi/libc-top-half/musl/src/stdio/printf.c",
    607     "wasi/libc-top-half/musl/src/stdio/putc.c",
    608     "wasi/libc-top-half/musl/src/stdio/putchar.c",
    609     "wasi/libc-top-half/musl/src/stdio/putchar_unlocked.c",
    610     "wasi/libc-top-half/musl/src/stdio/putc_unlocked.c",
    611     "wasi/libc-top-half/musl/src/stdio/puts.c",
    612     "wasi/libc-top-half/musl/src/stdio/putw.c",
    613     "wasi/libc-top-half/musl/src/stdio/putwc.c",
    614     "wasi/libc-top-half/musl/src/stdio/putwchar.c",
    615     "wasi/libc-top-half/musl/src/stdio/rewind.c",
    616     "wasi/libc-top-half/musl/src/stdio/scanf.c",
    617     "wasi/libc-top-half/musl/src/stdio/setbuf.c",
    618     "wasi/libc-top-half/musl/src/stdio/setbuffer.c",
    619     "wasi/libc-top-half/musl/src/stdio/setlinebuf.c",
    620     "wasi/libc-top-half/musl/src/stdio/setvbuf.c",
    621     "wasi/libc-top-half/musl/src/stdio/snprintf.c",
    622     "wasi/libc-top-half/musl/src/stdio/sprintf.c",
    623     "wasi/libc-top-half/musl/src/stdio/sscanf.c",
    624     "wasi/libc-top-half/musl/src/stdio/stderr.c",
    625     "wasi/libc-top-half/musl/src/stdio/stdin.c",
    626     "wasi/libc-top-half/musl/src/stdio/__stdio_close.c",
    627     "wasi/libc-top-half/musl/src/stdio/__stdio_exit.c",
    628     "wasi/libc-top-half/musl/src/stdio/__stdio_read.c",
    629     "wasi/libc-top-half/musl/src/stdio/__stdio_seek.c",
    630     "wasi/libc-top-half/musl/src/stdio/__stdio_write.c",
    631     "wasi/libc-top-half/musl/src/stdio/stdout.c",
    632     "wasi/libc-top-half/musl/src/stdio/__stdout_write.c",
    633     "wasi/libc-top-half/musl/src/stdio/swprintf.c",
    634     "wasi/libc-top-half/musl/src/stdio/swscanf.c",
    635     "wasi/libc-top-half/musl/src/stdio/__toread.c",
    636     "wasi/libc-top-half/musl/src/stdio/__towrite.c",
    637     "wasi/libc-top-half/musl/src/stdio/__uflow.c",
    638     "wasi/libc-top-half/musl/src/stdio/ungetc.c",
    639     "wasi/libc-top-half/musl/src/stdio/ungetwc.c",
    640     "wasi/libc-top-half/musl/src/stdio/vasprintf.c",
    641     "wasi/libc-top-half/musl/src/stdio/vdprintf.c",
    642     "wasi/libc-top-half/musl/src/stdio/vfprintf.c",
    643     "wasi/libc-top-half/musl/src/stdio/vfscanf.c",
    644     "wasi/libc-top-half/musl/src/stdio/vfwprintf.c",
    645     "wasi/libc-top-half/musl/src/stdio/vfwscanf.c",
    646     "wasi/libc-top-half/musl/src/stdio/vprintf.c",
    647     "wasi/libc-top-half/musl/src/stdio/vscanf.c",
    648     "wasi/libc-top-half/musl/src/stdio/vsnprintf.c",
    649     "wasi/libc-top-half/musl/src/stdio/vsprintf.c",
    650     "wasi/libc-top-half/musl/src/stdio/vsscanf.c",
    651     "wasi/libc-top-half/musl/src/stdio/vswprintf.c",
    652     "wasi/libc-top-half/musl/src/stdio/vswscanf.c",
    653     "wasi/libc-top-half/musl/src/stdio/vwprintf.c",
    654     "wasi/libc-top-half/musl/src/stdio/vwscanf.c",
    655     "wasi/libc-top-half/musl/src/stdio/wprintf.c",
    656     "wasi/libc-top-half/musl/src/stdio/wscanf.c",
    657     "wasi/libc-top-half/musl/src/string/bcmp.c",
    658     "wasi/libc-top-half/musl/src/string/bcopy.c",
    659     "wasi/libc-top-half/musl/src/string/bzero.c",
    660     "wasi/libc-top-half/musl/src/string/explicit_bzero.c",
    661     "wasi/libc-top-half/musl/src/string/index.c",
    662     "wasi/libc-top-half/musl/src/string/memccpy.c",
    663     "wasi/libc-top-half/musl/src/string/memchr.c",
    664     "wasi/libc-top-half/musl/src/string/memcmp.c",
    665     "wasi/libc-top-half/musl/src/string/memcpy.c",
    666     "wasi/libc-top-half/musl/src/string/memmem.c",
    667     "wasi/libc-top-half/musl/src/string/memmove.c",
    668     "wasi/libc-top-half/musl/src/string/mempcpy.c",
    669     "wasi/libc-top-half/musl/src/string/memrchr.c",
    670     "wasi/libc-top-half/musl/src/string/memset.c",
    671     "wasi/libc-top-half/musl/src/string/rindex.c",
    672     "wasi/libc-top-half/musl/src/string/stpcpy.c",
    673     "wasi/libc-top-half/musl/src/string/stpncpy.c",
    674     "wasi/libc-top-half/musl/src/string/strcasecmp.c",
    675     "wasi/libc-top-half/musl/src/string/strcasestr.c",
    676     "wasi/libc-top-half/musl/src/string/strcat.c",
    677     "wasi/libc-top-half/musl/src/string/strchr.c",
    678     "wasi/libc-top-half/musl/src/string/strchrnul.c",
    679     "wasi/libc-top-half/musl/src/string/strcmp.c",
    680     "wasi/libc-top-half/musl/src/string/strcpy.c",
    681     "wasi/libc-top-half/musl/src/string/strcspn.c",
    682     "wasi/libc-top-half/musl/src/string/strdup.c",
    683     "wasi/libc-top-half/musl/src/string/strerror_r.c",
    684     "wasi/libc-top-half/musl/src/string/strlcat.c",
    685     "wasi/libc-top-half/musl/src/string/strlcpy.c",
    686     "wasi/libc-top-half/musl/src/string/strlen.c",
    687     "wasi/libc-top-half/musl/src/string/strncasecmp.c",
    688     "wasi/libc-top-half/musl/src/string/strncat.c",
    689     "wasi/libc-top-half/musl/src/string/strncmp.c",
    690     "wasi/libc-top-half/musl/src/string/strncpy.c",
    691     "wasi/libc-top-half/musl/src/string/strndup.c",
    692     "wasi/libc-top-half/musl/src/string/strnlen.c",
    693     "wasi/libc-top-half/musl/src/string/strpbrk.c",
    694     "wasi/libc-top-half/musl/src/string/strrchr.c",
    695     "wasi/libc-top-half/musl/src/string/strsep.c",
    696     "wasi/libc-top-half/musl/src/string/strspn.c",
    697     "wasi/libc-top-half/musl/src/string/strstr.c",
    698     "wasi/libc-top-half/musl/src/string/strtok.c",
    699     "wasi/libc-top-half/musl/src/string/strtok_r.c",
    700     "wasi/libc-top-half/musl/src/string/strverscmp.c",
    701     "wasi/libc-top-half/musl/src/string/swab.c",
    702     "wasi/libc-top-half/musl/src/string/wcpcpy.c",
    703     "wasi/libc-top-half/musl/src/string/wcpncpy.c",
    704     "wasi/libc-top-half/musl/src/string/wcscasecmp.c",
    705     "wasi/libc-top-half/musl/src/string/wcscasecmp_l.c",
    706     "wasi/libc-top-half/musl/src/string/wcscat.c",
    707     "wasi/libc-top-half/musl/src/string/wcschr.c",
    708     "wasi/libc-top-half/musl/src/string/wcscmp.c",
    709     "wasi/libc-top-half/musl/src/string/wcscpy.c",
    710     "wasi/libc-top-half/musl/src/string/wcscspn.c",
    711     "wasi/libc-top-half/musl/src/string/wcsdup.c",
    712     "wasi/libc-top-half/musl/src/string/wcslen.c",
    713     "wasi/libc-top-half/musl/src/string/wcsncasecmp.c",
    714     "wasi/libc-top-half/musl/src/string/wcsncasecmp_l.c",
    715     "wasi/libc-top-half/musl/src/string/wcsncat.c",
    716     "wasi/libc-top-half/musl/src/string/wcsncmp.c",
    717     "wasi/libc-top-half/musl/src/string/wcsncpy.c",
    718     "wasi/libc-top-half/musl/src/string/wcsnlen.c",
    719     "wasi/libc-top-half/musl/src/string/wcspbrk.c",
    720     "wasi/libc-top-half/musl/src/string/wcsrchr.c",
    721     "wasi/libc-top-half/musl/src/string/wcsspn.c",
    722     "wasi/libc-top-half/musl/src/string/wcsstr.c",
    723     "wasi/libc-top-half/musl/src/string/wcstok.c",
    724     "wasi/libc-top-half/musl/src/string/wcswcs.c",
    725     "wasi/libc-top-half/musl/src/string/wmemchr.c",
    726     "wasi/libc-top-half/musl/src/string/wmemcmp.c",
    727     "wasi/libc-top-half/musl/src/string/wmemcpy.c",
    728     "wasi/libc-top-half/musl/src/string/wmemmove.c",
    729     "wasi/libc-top-half/musl/src/string/wmemset.c",
    730     "wasi/libc-top-half/musl/src/locale/catclose.c",
    731     "wasi/libc-top-half/musl/src/locale/catgets.c",
    732     "wasi/libc-top-half/musl/src/locale/catopen.c",
    733     "wasi/libc-top-half/musl/src/locale/c_locale.c",
    734     "wasi/libc-top-half/musl/src/locale/duplocale.c",
    735     "wasi/libc-top-half/musl/src/locale/freelocale.c",
    736     "wasi/libc-top-half/musl/src/locale/iconv.c",
    737     "wasi/libc-top-half/musl/src/locale/iconv_close.c",
    738     "wasi/libc-top-half/musl/src/locale/langinfo.c",
    739     "wasi/libc-top-half/musl/src/locale/__lctrans.c",
    740     "wasi/libc-top-half/musl/src/locale/localeconv.c",
    741     "wasi/libc-top-half/musl/src/locale/locale_map.c",
    742     "wasi/libc-top-half/musl/src/locale/__mo_lookup.c",
    743     "wasi/libc-top-half/musl/src/locale/newlocale.c",
    744     "wasi/libc-top-half/musl/src/locale/pleval.c",
    745     "wasi/libc-top-half/musl/src/locale/setlocale.c",
    746     "wasi/libc-top-half/musl/src/locale/strcoll.c",
    747     "wasi/libc-top-half/musl/src/locale/strfmon.c",
    748     "wasi/libc-top-half/musl/src/locale/strxfrm.c",
    749     "wasi/libc-top-half/musl/src/locale/uselocale.c",
    750     "wasi/libc-top-half/musl/src/locale/wcscoll.c",
    751     "wasi/libc-top-half/musl/src/locale/wcsxfrm.c",
    752     "wasi/libc-top-half/musl/src/stdlib/abs.c",
    753     "wasi/libc-top-half/musl/src/stdlib/atof.c",
    754     "wasi/libc-top-half/musl/src/stdlib/atoi.c",
    755     "wasi/libc-top-half/musl/src/stdlib/atol.c",
    756     "wasi/libc-top-half/musl/src/stdlib/atoll.c",
    757     "wasi/libc-top-half/musl/src/stdlib/bsearch.c",
    758     "wasi/libc-top-half/musl/src/stdlib/div.c",
    759     "wasi/libc-top-half/musl/src/stdlib/ecvt.c",
    760     "wasi/libc-top-half/musl/src/stdlib/fcvt.c",
    761     "wasi/libc-top-half/musl/src/stdlib/gcvt.c",
    762     "wasi/libc-top-half/musl/src/stdlib/imaxabs.c",
    763     "wasi/libc-top-half/musl/src/stdlib/imaxdiv.c",
    764     "wasi/libc-top-half/musl/src/stdlib/labs.c",
    765     "wasi/libc-top-half/musl/src/stdlib/ldiv.c",
    766     "wasi/libc-top-half/musl/src/stdlib/llabs.c",
    767     "wasi/libc-top-half/musl/src/stdlib/lldiv.c",
    768     "wasi/libc-top-half/musl/src/stdlib/qsort.c",
    769     "wasi/libc-top-half/musl/src/stdlib/strtod.c",
    770     "wasi/libc-top-half/musl/src/stdlib/strtol.c",
    771     "wasi/libc-top-half/musl/src/stdlib/wcstod.c",
    772     "wasi/libc-top-half/musl/src/stdlib/wcstol.c",
    773     "wasi/libc-top-half/musl/src/search/hsearch.c",
    774     "wasi/libc-top-half/musl/src/search/insque.c",
    775     "wasi/libc-top-half/musl/src/search/lsearch.c",
    776     "wasi/libc-top-half/musl/src/search/tdelete.c",
    777     "wasi/libc-top-half/musl/src/search/tdestroy.c",
    778     "wasi/libc-top-half/musl/src/search/tfind.c",
    779     "wasi/libc-top-half/musl/src/search/tsearch.c",
    780     "wasi/libc-top-half/musl/src/search/twalk.c",
    781     "wasi/libc-top-half/musl/src/multibyte/btowc.c",
    782     "wasi/libc-top-half/musl/src/multibyte/c16rtomb.c",
    783     "wasi/libc-top-half/musl/src/multibyte/c32rtomb.c",
    784     "wasi/libc-top-half/musl/src/multibyte/internal.c",
    785     "wasi/libc-top-half/musl/src/multibyte/mblen.c",
    786     "wasi/libc-top-half/musl/src/multibyte/mbrlen.c",
    787     "wasi/libc-top-half/musl/src/multibyte/mbrtoc16.c",
    788     "wasi/libc-top-half/musl/src/multibyte/mbrtoc32.c",
    789     "wasi/libc-top-half/musl/src/multibyte/mbrtowc.c",
    790     "wasi/libc-top-half/musl/src/multibyte/mbsinit.c",
    791     "wasi/libc-top-half/musl/src/multibyte/mbsnrtowcs.c",
    792     "wasi/libc-top-half/musl/src/multibyte/mbsrtowcs.c",
    793     "wasi/libc-top-half/musl/src/multibyte/mbstowcs.c",
    794     "wasi/libc-top-half/musl/src/multibyte/mbtowc.c",
    795     "wasi/libc-top-half/musl/src/multibyte/wcrtomb.c",
    796     "wasi/libc-top-half/musl/src/multibyte/wcsnrtombs.c",
    797     "wasi/libc-top-half/musl/src/multibyte/wcsrtombs.c",
    798     "wasi/libc-top-half/musl/src/multibyte/wcstombs.c",
    799     "wasi/libc-top-half/musl/src/multibyte/wctob.c",
    800     "wasi/libc-top-half/musl/src/multibyte/wctomb.c",
    801     "wasi/libc-top-half/musl/src/regex/fnmatch.c",
    802     "wasi/libc-top-half/musl/src/regex/glob.c",
    803     "wasi/libc-top-half/musl/src/regex/regcomp.c",
    804     "wasi/libc-top-half/musl/src/regex/regerror.c",
    805     "wasi/libc-top-half/musl/src/regex/regexec.c",
    806     "wasi/libc-top-half/musl/src/regex/tre-mem.c",
    807     "wasi/libc-top-half/musl/src/prng/drand48.c",
    808     "wasi/libc-top-half/musl/src/prng/lcong48.c",
    809     "wasi/libc-top-half/musl/src/prng/lrand48.c",
    810     "wasi/libc-top-half/musl/src/prng/mrand48.c",
    811     "wasi/libc-top-half/musl/src/prng/__rand48_step.c",
    812     "wasi/libc-top-half/musl/src/prng/rand.c",
    813     "wasi/libc-top-half/musl/src/prng/random.c",
    814     "wasi/libc-top-half/musl/src/prng/rand_r.c",
    815     "wasi/libc-top-half/musl/src/prng/__seed48.c",
    816     "wasi/libc-top-half/musl/src/prng/seed48.c",
    817     "wasi/libc-top-half/musl/src/prng/srand48.c",
    818     "wasi/libc-top-half/musl/src/conf/confstr.c",
    819     "wasi/libc-top-half/musl/src/conf/fpathconf.c",
    820     "wasi/libc-top-half/musl/src/conf/legacy.c",
    821     "wasi/libc-top-half/musl/src/conf/pathconf.c",
    822     "wasi/libc-top-half/musl/src/conf/sysconf.c",
    823     "wasi/libc-top-half/musl/src/ctype/__ctype_b_loc.c",
    824     "wasi/libc-top-half/musl/src/ctype/__ctype_get_mb_cur_max.c",
    825     "wasi/libc-top-half/musl/src/ctype/__ctype_tolower_loc.c",
    826     "wasi/libc-top-half/musl/src/ctype/__ctype_toupper_loc.c",
    827     "wasi/libc-top-half/musl/src/ctype/isalnum.c",
    828     "wasi/libc-top-half/musl/src/ctype/isalpha.c",
    829     "wasi/libc-top-half/musl/src/ctype/isascii.c",
    830     "wasi/libc-top-half/musl/src/ctype/isblank.c",
    831     "wasi/libc-top-half/musl/src/ctype/iscntrl.c",
    832     "wasi/libc-top-half/musl/src/ctype/isdigit.c",
    833     "wasi/libc-top-half/musl/src/ctype/isgraph.c",
    834     "wasi/libc-top-half/musl/src/ctype/islower.c",
    835     "wasi/libc-top-half/musl/src/ctype/isprint.c",
    836     "wasi/libc-top-half/musl/src/ctype/ispunct.c",
    837     "wasi/libc-top-half/musl/src/ctype/isspace.c",
    838     "wasi/libc-top-half/musl/src/ctype/isupper.c",
    839     "wasi/libc-top-half/musl/src/ctype/iswalnum.c",
    840     "wasi/libc-top-half/musl/src/ctype/iswalpha.c",
    841     "wasi/libc-top-half/musl/src/ctype/iswblank.c",
    842     "wasi/libc-top-half/musl/src/ctype/iswcntrl.c",
    843     "wasi/libc-top-half/musl/src/ctype/iswctype.c",
    844     "wasi/libc-top-half/musl/src/ctype/iswdigit.c",
    845     "wasi/libc-top-half/musl/src/ctype/iswgraph.c",
    846     "wasi/libc-top-half/musl/src/ctype/iswlower.c",
    847     "wasi/libc-top-half/musl/src/ctype/iswprint.c",
    848     "wasi/libc-top-half/musl/src/ctype/iswpunct.c",
    849     "wasi/libc-top-half/musl/src/ctype/iswspace.c",
    850     "wasi/libc-top-half/musl/src/ctype/iswupper.c",
    851     "wasi/libc-top-half/musl/src/ctype/iswxdigit.c",
    852     "wasi/libc-top-half/musl/src/ctype/isxdigit.c",
    853     "wasi/libc-top-half/musl/src/ctype/toascii.c",
    854     "wasi/libc-top-half/musl/src/ctype/tolower.c",
    855     "wasi/libc-top-half/musl/src/ctype/toupper.c",
    856     "wasi/libc-top-half/musl/src/ctype/towctrans.c",
    857     "wasi/libc-top-half/musl/src/ctype/wcswidth.c",
    858     "wasi/libc-top-half/musl/src/ctype/wctrans.c",
    859     "wasi/libc-top-half/musl/src/ctype/wcwidth.c",
    860     "wasi/libc-top-half/musl/src/math/acos.c",
    861     "wasi/libc-top-half/musl/src/math/acosf.c",
    862     "wasi/libc-top-half/musl/src/math/acosh.c",
    863     "wasi/libc-top-half/musl/src/math/acoshf.c",
    864     "wasi/libc-top-half/musl/src/math/acoshl.c",
    865     "wasi/libc-top-half/musl/src/math/acosl.c",
    866     "wasi/libc-top-half/musl/src/math/asin.c",
    867     "wasi/libc-top-half/musl/src/math/asinf.c",
    868     "wasi/libc-top-half/musl/src/math/asinh.c",
    869     "wasi/libc-top-half/musl/src/math/asinhf.c",
    870     "wasi/libc-top-half/musl/src/math/asinhl.c",
    871     "wasi/libc-top-half/musl/src/math/asinl.c",
    872     "wasi/libc-top-half/musl/src/math/atan2.c",
    873     "wasi/libc-top-half/musl/src/math/atan2f.c",
    874     "wasi/libc-top-half/musl/src/math/atan2l.c",
    875     "wasi/libc-top-half/musl/src/math/atan.c",
    876     "wasi/libc-top-half/musl/src/math/atanf.c",
    877     "wasi/libc-top-half/musl/src/math/atanh.c",
    878     "wasi/libc-top-half/musl/src/math/atanhf.c",
    879     "wasi/libc-top-half/musl/src/math/atanhl.c",
    880     "wasi/libc-top-half/musl/src/math/atanl.c",
    881     "wasi/libc-top-half/musl/src/math/cbrt.c",
    882     "wasi/libc-top-half/musl/src/math/cbrtf.c",
    883     "wasi/libc-top-half/musl/src/math/cbrtl.c",
    884     "wasi/libc-top-half/musl/src/math/ceill.c",
    885     "wasi/libc-top-half/musl/src/math/copysignl.c",
    886     "wasi/libc-top-half/musl/src/math/__cos.c",
    887     "wasi/libc-top-half/musl/src/math/cos.c",
    888     "wasi/libc-top-half/musl/src/math/__cosdf.c",
    889     "wasi/libc-top-half/musl/src/math/cosf.c",
    890     "wasi/libc-top-half/musl/src/math/cosh.c",
    891     "wasi/libc-top-half/musl/src/math/coshf.c",
    892     "wasi/libc-top-half/musl/src/math/coshl.c",
    893     "wasi/libc-top-half/musl/src/math/__cosl.c",
    894     "wasi/libc-top-half/musl/src/math/cosl.c",
    895     "wasi/libc-top-half/musl/src/math/erf.c",
    896     "wasi/libc-top-half/musl/src/math/erff.c",
    897     "wasi/libc-top-half/musl/src/math/erfl.c",
    898     "wasi/libc-top-half/musl/src/math/exp10.c",
    899     "wasi/libc-top-half/musl/src/math/exp10f.c",
    900     "wasi/libc-top-half/musl/src/math/exp10l.c",
    901     "wasi/libc-top-half/musl/src/math/exp2.c",
    902     "wasi/libc-top-half/musl/src/math/exp2f.c",
    903     "wasi/libc-top-half/musl/src/math/exp2f_data.c",
    904     "wasi/libc-top-half/musl/src/math/exp2l.c",
    905     "wasi/libc-top-half/musl/src/math/exp.c",
    906     "wasi/libc-top-half/musl/src/math/exp_data.c",
    907     "wasi/libc-top-half/musl/src/math/expf.c",
    908     "wasi/libc-top-half/musl/src/math/expl.c",
    909     "wasi/libc-top-half/musl/src/math/expm1.c",
    910     "wasi/libc-top-half/musl/src/math/expm1f.c",
    911     "wasi/libc-top-half/musl/src/math/expm1l.c",
    912     "wasi/libc-top-half/musl/src/math/__expo2.c",
    913     "wasi/libc-top-half/musl/src/math/__expo2f.c",
    914     "wasi/libc-top-half/musl/src/math/fabsl.c",
    915     "wasi/libc-top-half/musl/src/math/fdim.c",
    916     "wasi/libc-top-half/musl/src/math/fdimf.c",
    917     "wasi/libc-top-half/musl/src/math/fdiml.c",
    918     "wasi/libc-top-half/musl/src/math/finite.c",
    919     "wasi/libc-top-half/musl/src/math/finitef.c",
    920     "wasi/libc-top-half/musl/src/math/floorl.c",
    921     "wasi/libc-top-half/musl/src/math/fma.c",
    922     "wasi/libc-top-half/musl/src/math/fmaf.c",
    923     "wasi/libc-top-half/musl/src/math/fmal.c",
    924     "wasi/libc-top-half/musl/src/math/fmaxl.c",
    925     "wasi/libc-top-half/musl/src/math/fminl.c",
    926     "wasi/libc-top-half/musl/src/math/fmod.c",
    927     "wasi/libc-top-half/musl/src/math/fmodf.c",
    928     "wasi/libc-top-half/musl/src/math/fmodl.c",
    929     "wasi/libc-top-half/musl/src/math/frexp.c",
    930     "wasi/libc-top-half/musl/src/math/frexpf.c",
    931     "wasi/libc-top-half/musl/src/math/frexpl.c",
    932     "wasi/libc-top-half/musl/src/math/hypot.c",
    933     "wasi/libc-top-half/musl/src/math/hypotf.c",
    934     "wasi/libc-top-half/musl/src/math/hypotl.c",
    935     "wasi/libc-top-half/musl/src/math/ilogb.c",
    936     "wasi/libc-top-half/musl/src/math/ilogbf.c",
    937     "wasi/libc-top-half/musl/src/math/ilogbl.c",
    938     "wasi/libc-top-half/musl/src/math/__invtrigl.c",
    939     "wasi/libc-top-half/musl/src/math/j0.c",
    940     "wasi/libc-top-half/musl/src/math/j0f.c",
    941     "wasi/libc-top-half/musl/src/math/j1.c",
    942     "wasi/libc-top-half/musl/src/math/j1f.c",
    943     "wasi/libc-top-half/musl/src/math/jn.c",
    944     "wasi/libc-top-half/musl/src/math/jnf.c",
    945     "wasi/libc-top-half/musl/src/math/ldexp.c",
    946     "wasi/libc-top-half/musl/src/math/ldexpf.c",
    947     "wasi/libc-top-half/musl/src/math/ldexpl.c",
    948     "wasi/libc-top-half/musl/src/math/lgamma.c",
    949     "wasi/libc-top-half/musl/src/math/lgammaf.c",
    950     "wasi/libc-top-half/musl/src/math/lgammaf_r.c",
    951     "wasi/libc-top-half/musl/src/math/lgammal.c",
    952     "wasi/libc-top-half/musl/src/math/lgamma_r.c",
    953     "wasi/libc-top-half/musl/src/math/llrint.c",
    954     "wasi/libc-top-half/musl/src/math/llrintf.c",
    955     "wasi/libc-top-half/musl/src/math/llrintl.c",
    956     "wasi/libc-top-half/musl/src/math/llround.c",
    957     "wasi/libc-top-half/musl/src/math/llroundf.c",
    958     "wasi/libc-top-half/musl/src/math/llroundl.c",
    959     "wasi/libc-top-half/musl/src/math/log10.c",
    960     "wasi/libc-top-half/musl/src/math/log10f.c",
    961     "wasi/libc-top-half/musl/src/math/log10l.c",
    962     "wasi/libc-top-half/musl/src/math/log1p.c",
    963     "wasi/libc-top-half/musl/src/math/log1pf.c",
    964     "wasi/libc-top-half/musl/src/math/log1pl.c",
    965     "wasi/libc-top-half/musl/src/math/log2.c",
    966     "wasi/libc-top-half/musl/src/math/log2_data.c",
    967     "wasi/libc-top-half/musl/src/math/log2f.c",
    968     "wasi/libc-top-half/musl/src/math/log2f_data.c",
    969     "wasi/libc-top-half/musl/src/math/log2l.c",
    970     "wasi/libc-top-half/musl/src/math/logb.c",
    971     "wasi/libc-top-half/musl/src/math/logbf.c",
    972     "wasi/libc-top-half/musl/src/math/logbl.c",
    973     "wasi/libc-top-half/musl/src/math/log.c",
    974     "wasi/libc-top-half/musl/src/math/log_data.c",
    975     "wasi/libc-top-half/musl/src/math/logf.c",
    976     "wasi/libc-top-half/musl/src/math/logf_data.c",
    977     "wasi/libc-top-half/musl/src/math/logl.c",
    978     "wasi/libc-top-half/musl/src/math/lrint.c",
    979     "wasi/libc-top-half/musl/src/math/lrintf.c",
    980     "wasi/libc-top-half/musl/src/math/lrintl.c",
    981     "wasi/libc-top-half/musl/src/math/lround.c",
    982     "wasi/libc-top-half/musl/src/math/lroundf.c",
    983     "wasi/libc-top-half/musl/src/math/lroundl.c",
    984     "wasi/libc-top-half/musl/src/math/__math_divzero.c",
    985     "wasi/libc-top-half/musl/src/math/__math_divzerof.c",
    986     "wasi/libc-top-half/musl/src/math/__math_invalid.c",
    987     "wasi/libc-top-half/musl/src/math/__math_invalidf.c",
    988     "wasi/libc-top-half/musl/src/math/__math_invalidl.c",
    989     "wasi/libc-top-half/musl/src/math/__math_oflow.c",
    990     "wasi/libc-top-half/musl/src/math/__math_oflowf.c",
    991     "wasi/libc-top-half/musl/src/math/__math_uflow.c",
    992     "wasi/libc-top-half/musl/src/math/__math_uflowf.c",
    993     "wasi/libc-top-half/musl/src/math/__math_xflow.c",
    994     "wasi/libc-top-half/musl/src/math/__math_xflowf.c",
    995     "wasi/libc-top-half/musl/src/math/modf.c",
    996     "wasi/libc-top-half/musl/src/math/modff.c",
    997     "wasi/libc-top-half/musl/src/math/modfl.c",
    998     "wasi/libc-top-half/musl/src/math/nan.c",
    999     "wasi/libc-top-half/musl/src/math/nanf.c",
   1000     "wasi/libc-top-half/musl/src/math/nanl.c",
   1001     "wasi/libc-top-half/musl/src/math/nearbyintl.c",
   1002     "wasi/libc-top-half/musl/src/math/nextafter.c",
   1003     "wasi/libc-top-half/musl/src/math/nextafterf.c",
   1004     "wasi/libc-top-half/musl/src/math/nextafterl.c",
   1005     "wasi/libc-top-half/musl/src/math/nexttoward.c",
   1006     "wasi/libc-top-half/musl/src/math/nexttowardf.c",
   1007     "wasi/libc-top-half/musl/src/math/nexttowardl.c",
   1008     "wasi/libc-top-half/musl/src/math/__polevll.c",
   1009     "wasi/libc-top-half/musl/src/math/pow.c",
   1010     "wasi/libc-top-half/musl/src/math/pow_data.c",
   1011     "wasi/libc-top-half/musl/src/math/powf.c",
   1012     "wasi/libc-top-half/musl/src/math/powf_data.c",
   1013     "wasi/libc-top-half/musl/src/math/powl.c",
   1014     "wasi/libc-top-half/musl/src/math/remainder.c",
   1015     "wasi/libc-top-half/musl/src/math/remainderf.c",
   1016     "wasi/libc-top-half/musl/src/math/remainderl.c",
   1017     "wasi/libc-top-half/musl/src/math/__rem_pio2.c",
   1018     "wasi/libc-top-half/musl/src/math/__rem_pio2f.c",
   1019     "wasi/libc-top-half/musl/src/math/__rem_pio2_large.c",
   1020     "wasi/libc-top-half/musl/src/math/__rem_pio2l.c",
   1021     "wasi/libc-top-half/musl/src/math/remquo.c",
   1022     "wasi/libc-top-half/musl/src/math/remquof.c",
   1023     "wasi/libc-top-half/musl/src/math/remquol.c",
   1024     "wasi/libc-top-half/musl/src/math/rintl.c",
   1025     "wasi/libc-top-half/musl/src/math/round.c",
   1026     "wasi/libc-top-half/musl/src/math/roundf.c",
   1027     "wasi/libc-top-half/musl/src/math/roundl.c",
   1028     "wasi/libc-top-half/musl/src/math/scalb.c",
   1029     "wasi/libc-top-half/musl/src/math/scalbf.c",
   1030     "wasi/libc-top-half/musl/src/math/scalbln.c",
   1031     "wasi/libc-top-half/musl/src/math/scalblnf.c",
   1032     "wasi/libc-top-half/musl/src/math/scalblnl.c",
   1033     "wasi/libc-top-half/musl/src/math/scalbn.c",
   1034     "wasi/libc-top-half/musl/src/math/scalbnf.c",
   1035     "wasi/libc-top-half/musl/src/math/scalbnl.c",
   1036     "wasi/libc-top-half/musl/src/math/signgam.c",
   1037     "wasi/libc-top-half/musl/src/math/significand.c",
   1038     "wasi/libc-top-half/musl/src/math/significandf.c",
   1039     "wasi/libc-top-half/musl/src/math/__sin.c",
   1040     "wasi/libc-top-half/musl/src/math/sin.c",
   1041     "wasi/libc-top-half/musl/src/math/sincos.c",
   1042     "wasi/libc-top-half/musl/src/math/sincosf.c",
   1043     "wasi/libc-top-half/musl/src/math/sincosl.c",
   1044     "wasi/libc-top-half/musl/src/math/__sindf.c",
   1045     "wasi/libc-top-half/musl/src/math/sinf.c",
   1046     "wasi/libc-top-half/musl/src/math/sinh.c",
   1047     "wasi/libc-top-half/musl/src/math/sinhf.c",
   1048     "wasi/libc-top-half/musl/src/math/sinhl.c",
   1049     "wasi/libc-top-half/musl/src/math/__sinl.c",
   1050     "wasi/libc-top-half/musl/src/math/sinl.c",
   1051     "wasi/libc-top-half/musl/src/math/sqrt_data.c",
   1052     "wasi/libc-top-half/musl/src/math/sqrtl.c",
   1053     "wasi/libc-top-half/musl/src/math/__tan.c",
   1054     "wasi/libc-top-half/musl/src/math/tan.c",
   1055     "wasi/libc-top-half/musl/src/math/__tandf.c",
   1056     "wasi/libc-top-half/musl/src/math/tanf.c",
   1057     "wasi/libc-top-half/musl/src/math/tanh.c",
   1058     "wasi/libc-top-half/musl/src/math/tanhf.c",
   1059     "wasi/libc-top-half/musl/src/math/tanhl.c",
   1060     "wasi/libc-top-half/musl/src/math/__tanl.c",
   1061     "wasi/libc-top-half/musl/src/math/tanl.c",
   1062     "wasi/libc-top-half/musl/src/math/tgamma.c",
   1063     "wasi/libc-top-half/musl/src/math/tgammaf.c",
   1064     "wasi/libc-top-half/musl/src/math/tgammal.c",
   1065     "wasi/libc-top-half/musl/src/math/truncl.c",
   1066     "wasi/libc-top-half/musl/src/complex/cabs.c",
   1067     "wasi/libc-top-half/musl/src/complex/cabsf.c",
   1068     "wasi/libc-top-half/musl/src/complex/cabsl.c",
   1069     "wasi/libc-top-half/musl/src/complex/cacos.c",
   1070     "wasi/libc-top-half/musl/src/complex/cacosf.c",
   1071     "wasi/libc-top-half/musl/src/complex/cacosh.c",
   1072     "wasi/libc-top-half/musl/src/complex/cacoshf.c",
   1073     "wasi/libc-top-half/musl/src/complex/cacoshl.c",
   1074     "wasi/libc-top-half/musl/src/complex/cacosl.c",
   1075     "wasi/libc-top-half/musl/src/complex/carg.c",
   1076     "wasi/libc-top-half/musl/src/complex/cargf.c",
   1077     "wasi/libc-top-half/musl/src/complex/cargl.c",
   1078     "wasi/libc-top-half/musl/src/complex/casin.c",
   1079     "wasi/libc-top-half/musl/src/complex/casinf.c",
   1080     "wasi/libc-top-half/musl/src/complex/casinh.c",
   1081     "wasi/libc-top-half/musl/src/complex/casinhf.c",
   1082     "wasi/libc-top-half/musl/src/complex/casinhl.c",
   1083     "wasi/libc-top-half/musl/src/complex/casinl.c",
   1084     "wasi/libc-top-half/musl/src/complex/catan.c",
   1085     "wasi/libc-top-half/musl/src/complex/catanf.c",
   1086     "wasi/libc-top-half/musl/src/complex/catanh.c",
   1087     "wasi/libc-top-half/musl/src/complex/catanhf.c",
   1088     "wasi/libc-top-half/musl/src/complex/catanhl.c",
   1089     "wasi/libc-top-half/musl/src/complex/catanl.c",
   1090     "wasi/libc-top-half/musl/src/complex/ccos.c",
   1091     "wasi/libc-top-half/musl/src/complex/ccosf.c",
   1092     "wasi/libc-top-half/musl/src/complex/ccosh.c",
   1093     "wasi/libc-top-half/musl/src/complex/ccoshf.c",
   1094     "wasi/libc-top-half/musl/src/complex/ccoshl.c",
   1095     "wasi/libc-top-half/musl/src/complex/ccosl.c",
   1096     "wasi/libc-top-half/musl/src/complex/__cexp.c",
   1097     "wasi/libc-top-half/musl/src/complex/cexp.c",
   1098     "wasi/libc-top-half/musl/src/complex/__cexpf.c",
   1099     "wasi/libc-top-half/musl/src/complex/cexpf.c",
   1100     "wasi/libc-top-half/musl/src/complex/cexpl.c",
   1101     "wasi/libc-top-half/musl/src/complex/clog.c",
   1102     "wasi/libc-top-half/musl/src/complex/clogf.c",
   1103     "wasi/libc-top-half/musl/src/complex/clogl.c",
   1104     "wasi/libc-top-half/musl/src/complex/conj.c",
   1105     "wasi/libc-top-half/musl/src/complex/conjf.c",
   1106     "wasi/libc-top-half/musl/src/complex/conjl.c",
   1107     "wasi/libc-top-half/musl/src/complex/cpow.c",
   1108     "wasi/libc-top-half/musl/src/complex/cpowf.c",
   1109     "wasi/libc-top-half/musl/src/complex/cpowl.c",
   1110     "wasi/libc-top-half/musl/src/complex/cproj.c",
   1111     "wasi/libc-top-half/musl/src/complex/cprojf.c",
   1112     "wasi/libc-top-half/musl/src/complex/cprojl.c",
   1113     "wasi/libc-top-half/musl/src/complex/csin.c",
   1114     "wasi/libc-top-half/musl/src/complex/csinf.c",
   1115     "wasi/libc-top-half/musl/src/complex/csinh.c",
   1116     "wasi/libc-top-half/musl/src/complex/csinhf.c",
   1117     "wasi/libc-top-half/musl/src/complex/csinhl.c",
   1118     "wasi/libc-top-half/musl/src/complex/csinl.c",
   1119     "wasi/libc-top-half/musl/src/complex/csqrt.c",
   1120     "wasi/libc-top-half/musl/src/complex/csqrtf.c",
   1121     "wasi/libc-top-half/musl/src/complex/csqrtl.c",
   1122     "wasi/libc-top-half/musl/src/complex/ctan.c",
   1123     "wasi/libc-top-half/musl/src/complex/ctanf.c",
   1124     "wasi/libc-top-half/musl/src/complex/ctanh.c",
   1125     "wasi/libc-top-half/musl/src/complex/ctanhf.c",
   1126     "wasi/libc-top-half/musl/src/complex/ctanhl.c",
   1127     "wasi/libc-top-half/musl/src/complex/ctanl.c",
   1128     "wasi/libc-top-half/musl/src/crypt/crypt_blowfish.c",
   1129     "wasi/libc-top-half/musl/src/crypt/crypt.c",
   1130     "wasi/libc-top-half/musl/src/crypt/crypt_des.c",
   1131     "wasi/libc-top-half/musl/src/crypt/crypt_md5.c",
   1132     "wasi/libc-top-half/musl/src/crypt/crypt_r.c",
   1133     "wasi/libc-top-half/musl/src/crypt/crypt_sha256.c",
   1134     "wasi/libc-top-half/musl/src/crypt/crypt_sha512.c",
   1135     "wasi/libc-top-half/musl/src/crypt/encrypt.c",
   1136     "wasi/libc-top-half/sources/arc4random.c",
   1137 };
   1138 
   1139 const crt1_src_file = "wasi/libc-bottom-half/crt/crt1.c";
   1140 const crt1_command_src_file = "wasi/libc-bottom-half/crt/crt1-command.c";
   1141 const crt1_reactor_src_file = "wasi/libc-bottom-half/crt/crt1-reactor.c";
   1142 
   1143 const emulated_process_clocks_src_files = &[_][]const u8{
   1144     "wasi/libc-bottom-half/clocks/clock.c",
   1145     "wasi/libc-bottom-half/clocks/getrusage.c",
   1146     "wasi/libc-bottom-half/clocks/times.c",
   1147 };
   1148 
   1149 const emulated_getpid_src_files = &[_][]const u8{
   1150     "wasi/libc-bottom-half/getpid/getpid.c",
   1151 };
   1152 
   1153 const emulated_mman_src_files = &[_][]const u8{
   1154     "wasi/libc-bottom-half/mman/mman.c",
   1155 };
   1156 
   1157 const emulated_signal_bottom_half_src_files = &[_][]const u8{
   1158     "wasi/libc-bottom-half/signal/signal.c",
   1159 };
   1160 
   1161 const emulated_signal_top_half_src_files = &[_][]const u8{
   1162     "wasi/libc-top-half/musl/src/signal/psignal.c",
   1163     "wasi/libc-top-half/musl/src/string/strsignal.c",
   1164 };