| ... | @@ -58,7 +58,8 @@ pub fn link(comp: *Compilation) !void { | ... | @@ -58,7 +58,8 @@ pub fn link(comp: *Compilation) !void { |
| 58 | try ctx.args.append("lld"); | 58 | try ctx.args.append("lld"); |
| 59 | | 59 | |
| 60 | if (comp.haveLibC()) { | 60 | if (comp.haveLibC()) { |
| 61 | ctx.libc = ctx.comp.override_libc orelse blk: { | 61 | // TODO https://github.com/ziglang/zig/issues/3190 |
| | 62 | var libc = ctx.comp.override_libc orelse blk: { |
| 62 | switch (comp.target) { | 63 | switch (comp.target) { |
| 63 | Target.Native => { | 64 | Target.Native => { |
| 64 | break :blk comp.zig_compiler.getNativeLibC() catch return error.LibCRequiredButNotProvidedOrFound; | 65 | break :blk comp.zig_compiler.getNativeLibC() catch return error.LibCRequiredButNotProvidedOrFound; |
| ... | @@ -66,6 +67,7 @@ pub fn link(comp: *Compilation) !void { | ... | @@ -66,6 +67,7 @@ pub fn link(comp: *Compilation) !void { |
| 66 | else => return error.LibCRequiredButNotProvidedOrFound, | 67 | else => return error.LibCRequiredButNotProvidedOrFound, |
| 67 | } | 68 | } |
| 68 | }; | 69 | }; |
| | 70 | ctx.libc = libc; |
| 69 | } | 71 | } |
| 70 | | 72 | |
| 71 | try constructLinkerArgs(&ctx); | 73 | try constructLinkerArgs(&ctx); |