| author | |
| committer | |
| log | e2a71b37d867e5567e06c8e57b04e648ade4aca3 |
| tree | 87e6f0af2e722a27a1dd4ba06da16770cea5b4f0 |
| parent | 8cfe303da907df41b41d2d78181760f80dc6579f |
2 files changed, 13 insertions(+), 1 deletions(-)
src/link.zig+6| ... | ... | @@ -2003,6 +2003,12 @@ pub fn openArchiveInput(diags: *Diags, path: Path) error{LinkFailure}!Input { |
| 2003 | 2003 | } }; |
| 2004 | 2004 | } |
| 2005 | 2005 | |
| 2006 | pub fn openDsoInput(diags: *Diags, path: Path, needed: bool, weak: bool, reexport: bool) error{LinkFailure}!Input { | |
| 2007 | return .{ .dso = openDso(path, needed, weak, reexport) catch |err| { | |
| 2008 | return diags.failParse(path, "failed to open {}: {s}", .{ path, @errorName(err) }); | |
| 2009 | } }; | |
| 2010 | } | |
| 2011 | ||
| 2006 | 2012 | fn stripLibPrefixAndSuffix(path: []const u8, target: std.Target) ?struct { []const u8, std.builtin.LinkMode } { |
| 2007 | 2013 | const prefix = target.libPrefix(); |
| 2008 | 2014 | const static_suffix = target.staticLibSuffix(); |
src/link/MachO.zig+7-1| ... | ... | @@ -446,6 +446,12 @@ pub fn flushModule(self: *MachO, arena: Allocator, tid: Zcu.PerThread.Id, prog_n |
| 446 | 446 | }, |
| 447 | 447 | }; |
| 448 | 448 | |
| 449 | for (system_libs.items) |lib| { | |
| 450 | const dso_input = try link.openDsoInput(diags, lib.path, lib.needed, lib.weak, lib.reexport); | |
| 451 | self.classifyInputFile(dso_input) catch |err| | |
| 452 | diags.addParseError(lib.path, "failed to parse input file: {s}", .{@errorName(err)}); | |
| 453 | } | |
| 454 | ||
| 449 | 455 | // Finally, link against compiler_rt. |
| 450 | 456 | if (comp.compiler_rt_lib) |crt_file| { |
| 451 | 457 | const path = crt_file.full_object_path; |
| ... | ... | @@ -765,7 +771,7 @@ fn dumpArgv(self: *MachO, comp: *Compilation) !void { |
| 765 | 771 | Compilation.dump_argv(argv.items); |
| 766 | 772 | } |
| 767 | 773 | |
| 768 | /// TODO delete this, libsystem must be resolved when setting up the compilationt pipeline | |
| 774 | /// TODO delete this, libsystem must be resolved when setting up the compilation pipeline | |
| 769 | 775 | pub fn resolveLibSystem( |
| 770 | 776 | self: *MachO, |
| 771 | 777 | arena: Allocator, |