mirror of
https://github.com/ziglang/zig.git
synced 2024-12-03 18:38:45 +00:00
self-hosted build: print helpful message when libstdc++.a not found
closes #843
This commit is contained in:
parent
71b4ee931e
commit
cb744f3a28
@ -64,6 +64,14 @@ pub fn build(b: &Builder) !void {
|
||||
if (exe.target.getOs() == builtin.Os.linux) {
|
||||
const libstdcxx_path_padded = try b.exec([][]const u8{cxx_compiler, "-print-file-name=libstdc++.a"});
|
||||
const libstdcxx_path = ??mem.split(libstdcxx_path_padded, "\r\n").next();
|
||||
if (mem.eql(u8, libstdcxx_path, "libstdc++.a")) {
|
||||
warn(
|
||||
\\Unable to determine path to libstdc++.a
|
||||
\\On Fedora, install libstdc++-static and try again.
|
||||
\\
|
||||
);
|
||||
return error.RequiredLibraryNotFound;
|
||||
}
|
||||
exe.addObjectFile(libstdcxx_path);
|
||||
|
||||
exe.linkSystemLibrary("pthread");
|
||||
|
Loading…
Reference in New Issue
Block a user