Skip to content

Commit

Permalink
Zig build fixes for latest Zig nightly build
Browse files Browse the repository at this point in the history
  • Loading branch information
bobf committed Dec 22, 2024
1 parent 475ed26 commit e89d146
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ pub fn jetzigInit(b: *std.Build, exe: *std.Build.Step.Compile, options: JetzigIn
return error.ZmplVersionNotSupported;
}

const target = b.host;
const target = exe.root_module.resolved_target orelse @panic("Unable to detect compile target.");
const optimize = exe.root_module.optimize orelse .Debug;

if (optimize != .Debug) exe.linkLibC();
Expand Down Expand Up @@ -159,10 +159,7 @@ pub fn jetzigInit(b: *std.Build, exe: *std.Build.Step.Compile, options: JetzigIn

const jetzig_dep = b.dependency(
"jetzig",
.{
.optimize = optimize,
.target = target,
},
.{ .optimize = optimize, .target = target },
);

const jetquery_dep = jetzig_dep.builder.dependency("jetquery", .{
Expand Down Expand Up @@ -399,7 +396,7 @@ pub fn jetzigInit(b: *std.Build, exe: *std.Build.Step.Compile, options: JetzigIn

exe_routes.root_module.addImport("jetzig", jetzig_module);
exe_routes.root_module.addImport("routes", routes_module);
exe_routes.root_module.addImport("app", &exe.root_module);
exe_routes.root_module.addImport("app", exe.root_module);
const run_routes_cmd = b.addRunArtifact(exe_routes);
routes_step.dependOn(&run_routes_cmd.step);
}
Expand Down

0 comments on commit e89d146

Please sign in to comment.