authorgravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-10-17 23:23:33+02:00
committergravatar for kubkon@jakubkonka.comJakub Konka <kubkon@jakubkonka.com> 2023-10-17 23:23:33+02:00
log533e2671c9f5ee29d4a42bfb6faad651eef00bc0
treeae2cc4229af3cc01a659588618a95405ce4b74a1
parenteb5276c94eaab238551fdae9a2e77b0133e31cfb

elf: add native libc* system libraries to the invocation


1 files changed, 9 insertions(+), 2 deletions(-)

src/link/Elf.zig+9-2
......@@ -1383,8 +1383,15 @@ pub fn flushModule(self: *Elf, comp: *Compilation, prog_node: *std.Progress.Node
13831383 // libc dep
13841384 self.error_flags.missing_libc = false;
13851385 if (self.base.options.link_libc) {
1386 if (self.base.options.libc_installation != null) {
1387 @panic("TODO explicit libc_installation");
1386 if (self.base.options.libc_installation) |lc| {
1387 const flags = target_util.libcFullLinkFlags(target);
1388 try system_libs.ensureUnusedCapacity(flags.len);
1389 for (flags) |flag| {
1390 const lib_path = try std.fmt.allocPrint(arena, "{s}{c}lib{s}.so", .{
1391 lc.crt_dir.?, fs.path.sep, flag["-l".len..],
1392 });
1393 system_libs.appendAssumeCapacity(.{ .path = lib_path });
1394 }
13881395 } else if (target.isGnuLibC()) {
13891396 try system_libs.ensureUnusedCapacity(glibc.libs.len + 1);
13901397 for (glibc.libs) |lib| {