use faller for logging
This commit is contained in:
15
build.zig
15
build.zig
@@ -42,17 +42,20 @@ pub fn build(b: *std.Build) !void {
|
||||
const target = b.standardTargetOptions(.{});
|
||||
const optimize = b.standardOptimizeOption(.{});
|
||||
|
||||
try compileTestApplications(b, target, optimize, false, false);
|
||||
try compileTestApplications(b, target, optimize, false, true);
|
||||
try compileTestApplications(b, target, optimize, true, true);
|
||||
const faller = b.dependency("faller", .{
|
||||
.target = target,
|
||||
.optimize = optimize,
|
||||
});
|
||||
|
||||
const mod = b.addModule("loader", .{
|
||||
const mod = b.createModule(.{
|
||||
.root_source_file = b.path("src/main.zig"),
|
||||
.optimize = optimize,
|
||||
.target = target,
|
||||
.link_libc = false,
|
||||
.link_libcpp = false,
|
||||
});
|
||||
mod.addImport("faller", faller.module("faller"));
|
||||
|
||||
const exe = b.addExecutable(.{
|
||||
.name = "loader",
|
||||
.root_module = mod,
|
||||
@@ -68,6 +71,10 @@ pub fn build(b: *std.Build) !void {
|
||||
run_cmd.addArgs(args);
|
||||
}
|
||||
|
||||
try compileTestApplications(b, target, optimize, false, false);
|
||||
try compileTestApplications(b, target, optimize, false, true);
|
||||
try compileTestApplications(b, target, optimize, true, true);
|
||||
|
||||
const exe_tests = b.addTest(.{ .root_module = mod });
|
||||
const run_exe_tests = b.addRunArtifact(exe_tests);
|
||||
const test_step = b.step("test", "Run tests");
|
||||
|
||||
Reference in New Issue
Block a user