authorgravatar for i@mgxm.meMarcio Giaxa <i@mgxm.me> 2018-12-18 00:19:52-02:00
committergravatar for i@mgxm.meMarcio Giaxa <i@mgxm.me> 2018-12-19 18:42:00-02:00
log6cfcdbde2b902476863cb912190f20ce5e02277c
tree336b5510746ec84f485b426128cd50f9f4c79a87
parent1fc56b82ad6f1060ec4b2074c16accfe0327a4b7

freebsd: link against libc++

All supported versions of FreeBSD have libc++ in the base system.

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

build.zig+8-2
......@@ -293,11 +293,17 @@ fn configureStage2(b: *Builder, exe: var, ctx: Context) !void {
293293 try addCxxKnownPath(b, ctx, exe, "libstdc++.a",
294294 \\Unable to determine path to libstdc++.a
295295 \\On Fedora, install libstdc++-static and try again.
296 \\
297296 );
298297
299298 exe.linkSystemLibrary("pthread");
300 } else if (exe.target.isDarwin() or exe.target.isFreeBSD()) {
299 } else if (exe.target.isFreeBSD()) {
300 try addCxxKnownPath(b, ctx, exe, "libc++.a", null);
301 exe.linkSystemLibrary("pthread");
302 // TODO LLD cannot perform this link.
303 // See https://github.com/ziglang/zig/issues/1535
304 exe.enableSystemLinkerHack();
305 }
306 else if (exe.target.isDarwin()) {
301307 if (addCxxKnownPath(b, ctx, exe, "libgcc_eh.a", "")) {
302308 // Compiler is GCC.
303309 try addCxxKnownPath(b, ctx, exe, "libstdc++.a", null);