| ... | @@ -3824,6 +3824,15 @@ fn createModule( | ... | @@ -3824,6 +3824,15 @@ fn createModule( |
| 3824 | for (create_module.cli_link_inputs.items) |cli_link_input| switch (cli_link_input) { | 3824 | for (create_module.cli_link_inputs.items) |cli_link_input| switch (cli_link_input) { |
| 3825 | .name_query => |nq| { | 3825 | .name_query => |nq| { |
| 3826 | const lib_name = nq.name; | 3826 | const lib_name = nq.name; |
| | 3827 | |
| | 3828 | if (target.os.tag == .wasi) { |
| | 3829 | if (wasi_libc.getEmulatedLibCrtFile(lib_name)) |crt_file| { |
| | 3830 | try create_module.wasi_emulated_libs.append(arena, crt_file); |
| | 3831 | create_module.opts.link_libc = true; |
| | 3832 | continue; |
| | 3833 | } |
| | 3834 | } |
| | 3835 | |
| 3827 | if (std.zig.target.isLibCLibName(target, lib_name)) { | 3836 | if (std.zig.target.isLibCLibName(target, lib_name)) { |
| 3828 | create_module.opts.link_libc = true; | 3837 | create_module.opts.link_libc = true; |
| 3829 | continue; | 3838 | continue; |
| ... | @@ -3832,6 +3841,7 @@ fn createModule( | ... | @@ -3832,6 +3841,7 @@ fn createModule( |
| 3832 | create_module.opts.link_libcpp = true; | 3841 | create_module.opts.link_libcpp = true; |
| 3833 | continue; | 3842 | continue; |
| 3834 | } | 3843 | } |
| | 3844 | |
| 3835 | switch (target_util.classifyCompilerRtLibName(lib_name)) { | 3845 | switch (target_util.classifyCompilerRtLibName(lib_name)) { |
| 3836 | .none => {}, | 3846 | .none => {}, |
| 3837 | .only_libunwind, .both => { | 3847 | .only_libunwind, .both => { |
| ... | @@ -3857,12 +3867,6 @@ fn createModule( | ... | @@ -3857,12 +3867,6 @@ fn createModule( |
| 3857 | fatal("cannot use absolute path as a system library: {s}", .{lib_name}); | 3867 | fatal("cannot use absolute path as a system library: {s}", .{lib_name}); |
| 3858 | } | 3868 | } |
| 3859 | | 3869 | |
| 3860 | if (target.os.tag == .wasi) { | | |
| 3861 | if (wasi_libc.getEmulatedLibCrtFile(lib_name)) |crt_file| { | | |
| 3862 | try create_module.wasi_emulated_libs.append(arena, crt_file); | | |
| 3863 | continue; | | |
| 3864 | } | | |
| 3865 | } | | |
| 3866 | unresolved_link_inputs.appendAssumeCapacity(cli_link_input); | 3870 | unresolved_link_inputs.appendAssumeCapacity(cli_link_input); |
| 3867 | any_name_queries_remaining = true; | 3871 | any_name_queries_remaining = true; |
| 3868 | }, | 3872 | }, |