Fixes cross compilation by running generator on native target

This commit is contained in:
Mason Remaley 2024-08-23 09:22:30 -07:00
parent 9950160840
commit e114e2fbf1

View file

@ -10,6 +10,7 @@ pub fn build(b: *std.Build) void {
// Standard options
const target = b.standardTargetOptions(.{});
const optimize = b.standardOptimizeOption(.{});
const native_target = b.resolveTargetQuery(.{});
const optimize_external = switch (optimize) {
.Debug => .ReleaseSafe,
@ -68,7 +69,7 @@ pub fn build(b: *std.Build) void {
const generate_exe = b.addExecutable(.{
.name = "generate",
.root_source_file = b.path("src/generate.zig"),
.target = target,
.target = native_target,
.optimize = optimize,
});