Implement kCTF strategy
This implementation is pretty scuffed, but its more exploratory than anything else.
This commit is contained in:
@@ -2,17 +2,13 @@ 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 }),
|
||||
});
|
||||
const target = b.standardTargetOptions(.{});
|
||||
|
||||
// solver
|
||||
const solver_mod = b.addModule("solver", .{
|
||||
.root_source_file = b.path("src/solver.zig"),
|
||||
.optimize = optimize,
|
||||
.target = wasm_target,
|
||||
.target = target,
|
||||
});
|
||||
|
||||
const solver_exe = b.addExecutable(.{
|
||||
@@ -20,10 +16,12 @@ pub fn build(b: *std.Build) void {
|
||||
.root_module = solver_mod,
|
||||
});
|
||||
|
||||
solver_exe.entry = .disabled;
|
||||
solver_exe.rdynamic = true;
|
||||
solver_exe.lto = .full;
|
||||
solver_exe.link_gc_sections = true;
|
||||
if (target.result.cpu.arch == .wasm32) {
|
||||
solver_exe.entry = .disabled;
|
||||
solver_exe.rdynamic = true;
|
||||
solver_exe.link_gc_sections = true;
|
||||
solver_exe.lto = .full;
|
||||
}
|
||||
|
||||
b.installArtifact(solver_exe);
|
||||
|
||||
@@ -31,16 +29,18 @@ pub fn build(b: *std.Build) void {
|
||||
const validator_mod = b.addModule("validator", .{
|
||||
.root_source_file = b.path("src/validator.zig"),
|
||||
.optimize = optimize,
|
||||
.target = wasm_target,
|
||||
.target = target,
|
||||
});
|
||||
|
||||
const validator_exe = b.addLibrary(.{
|
||||
const validator_exe = b.addExecutable(.{
|
||||
.name = "validator",
|
||||
.root_module = validator_mod,
|
||||
});
|
||||
|
||||
validator_exe.entry = .disabled;
|
||||
validator_exe.rdynamic = true;
|
||||
if (target.result.cpu.arch == .wasm32) {
|
||||
validator_exe.entry = .disabled;
|
||||
validator_exe.rdynamic = true;
|
||||
}
|
||||
|
||||
b.installArtifact(validator_exe);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user