diff options
| author | Marcio Giaxa <i@mgxm.me> | 2018-12-18 00:19:52 -0200 |
|---|---|---|
| committer | Marcio Giaxa <i@mgxm.me> | 2018-12-19 18:42:00 -0200 |
| commit | 6cfcdbde2b902476863cb912190f20ce5e02277c (patch) | |
| tree | 336b5510746ec84f485b426128cd50f9f4c79a87 /build.zig | |
| parent | 1fc56b82ad6f1060ec4b2074c16accfe0327a4b7 (diff) | |
| download | zig-6cfcdbde2b902476863cb912190f20ce5e02277c.tar.gz zig-6cfcdbde2b902476863cb912190f20ce5e02277c.zip | |
freebsd: link against libc++
All supported versions of FreeBSD have libc++ in the base system.
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -293,11 +293,17 @@ fn configureStage2(b: *Builder, exe: var, ctx: Context) !void { try addCxxKnownPath(b, ctx, exe, "libstdc++.a", \\Unable to determine path to libstdc++.a \\On Fedora, install libstdc++-static and try again. - \\ ); exe.linkSystemLibrary("pthread"); - } else if (exe.target.isDarwin() or exe.target.isFreeBSD()) { + } else if (exe.target.isFreeBSD()) { + try addCxxKnownPath(b, ctx, exe, "libc++.a", null); + exe.linkSystemLibrary("pthread"); + // TODO LLD cannot perform this link. + // See https://github.com/ziglang/zig/issues/1535 + exe.enableSystemLinkerHack(); + } + else if (exe.target.isDarwin()) { if (addCxxKnownPath(b, ctx, exe, "libgcc_eh.a", "")) { // Compiler is GCC. try addCxxKnownPath(b, ctx, exe, "libstdc++.a", null); |
