Files
impost/solver/build.zig
Zoe cfab3d0b8f Initial commit
Once again a weird place to commit, I have already done a lot of work, but I am just bad at using git, okay.
2025-11-17 16:12:26 +00:00

47 lines
1.2 KiB
Zig

const std = @import("std");
pub fn build(b: *std.Build) void {
const optimize = b.standardOptimizeOption(.{});
const wasm_target = b.resolveTargetQuery(.{
.cpu_arch = .wasm32,
.os_tag = .freestanding,
.cpu_features_add = std.Target.wasm.featureSet(&.{ .bulk_memory, .bulk_memory_opt, .simd128, .tail_call }),
});
// solver
const solver_mod = b.addModule("solver", .{
.root_source_file = b.path("src/solver.zig"),
.optimize = optimize,
.target = wasm_target,
});
const solver_exe = b.addExecutable(.{
.name = "solver",
.root_module = solver_mod,
});
solver_exe.entry = .disabled;
solver_exe.rdynamic = true;
solver_exe.lto = .full;
solver_exe.link_gc_sections = true;
b.installArtifact(solver_exe);
// validator
const validator_mod = b.addModule("validator", .{
.root_source_file = b.path("src/validator.zig"),
.optimize = optimize,
.target = wasm_target,
});
const validator_exe = b.addLibrary(.{
.name = "validator",
.root_module = validator_mod,
});
validator_exe.entry = .disabled;
validator_exe.rdynamic = true;
b.installArtifact(validator_exe);
}