Update zig bindings to 0.13.0
This commit is contained in:
parent
87610baa3f
commit
da9b95501c
12
build.zig
12
build.zig
|
@ -1,7 +1,7 @@
|
|||
//! License: GNU GENERAL PUBLIC LICENSE Version 2
|
||||
|
||||
const std = @import("std");
|
||||
const MIN_ZIG_VERSION: []const u8 = "0.12.0";
|
||||
const MIN_ZIG_VERSION: []const u8 = "0.13.0";
|
||||
const MIN_ZIG_VERSION_ERR_MSG = "Please! Update zig toolchain to >= v" ++ MIN_ZIG_VERSION;
|
||||
|
||||
const SampleFileTypes = enum {
|
||||
|
@ -125,16 +125,14 @@ fn buildExe(b: *std.Build, info: BuildInfo) *std.Build.Step.Compile {
|
|||
.name = info.filename(),
|
||||
.target = info.target,
|
||||
.optimize = info.optimize,
|
||||
.root_source_file = .{
|
||||
.path = info.filepath,
|
||||
},
|
||||
.root_source_file = b.path(info.filepath),
|
||||
},
|
||||
};
|
||||
const exe = b.addExecutable(execonfig);
|
||||
|
||||
if (info.filetype != .zig) {
|
||||
exe.addCSourceFile(.{
|
||||
.file = .{ .path = info.filepath },
|
||||
.file = b.path(info.filepath),
|
||||
.flags = &.{
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
|
@ -144,10 +142,10 @@ fn buildExe(b: *std.Build, info: BuildInfo) *std.Build.Step.Compile {
|
|||
});
|
||||
|
||||
// Ensure the C headers are available
|
||||
exe.addIncludePath(.{ .path = "include" });
|
||||
exe.addIncludePath(b.path("include"));
|
||||
|
||||
// Ensure the C library is available
|
||||
exe.addLibraryPath(.{ .path = "build" });
|
||||
exe.addLibraryPath(b.path("build"));
|
||||
|
||||
// linking to OS-LibC or static-linking for:
|
||||
// Musl(Linux) [e.g: -Dtarget=native-linux-musl]
|
||||
|
|
Loading…
Reference in New Issue