mirror of
https://github.com/ziglang/zig.git
synced 2024-12-04 02:48:50 +00:00
freebsd: link against libc++
All supported versions of FreeBSD have libc++ in the base system.
This commit is contained in:
parent
1fc56b82ad
commit
6cfcdbde2b
10
build.zig
10
build.zig
@ -293,11 +293,17 @@ fn configureStage2(b: *Builder, exe: var, ctx: Context) !void {
|
|||||||
try addCxxKnownPath(b, ctx, exe, "libstdc++.a",
|
try addCxxKnownPath(b, ctx, exe, "libstdc++.a",
|
||||||
\\Unable to determine path to libstdc++.a
|
\\Unable to determine path to libstdc++.a
|
||||||
\\On Fedora, install libstdc++-static and try again.
|
\\On Fedora, install libstdc++-static and try again.
|
||||||
\\
|
|
||||||
);
|
);
|
||||||
|
|
||||||
exe.linkSystemLibrary("pthread");
|
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", "")) {
|
if (addCxxKnownPath(b, ctx, exe, "libgcc_eh.a", "")) {
|
||||||
// Compiler is GCC.
|
// Compiler is GCC.
|
||||||
try addCxxKnownPath(b, ctx, exe, "libstdc++.a", null);
|
try addCxxKnownPath(b, ctx, exe, "libstdc++.a", null);
|
||||||
|
Loading…
Reference in New Issue
Block a user