Skip to content

Commit 0f8669b

Browse files
committed
update build
1 parent 4610382 commit 0f8669b

File tree

1 file changed

+12
-5
lines changed

1 file changed

+12
-5
lines changed

build.zig

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -224,14 +224,17 @@ pub fn build(b: *std.Build) void {
224224
docs_step.dependOn(&install_docs.step);
225225

226226
// Add formal verification test
227-
const formal_test = b.addExecutable(.{
228-
.name = "formal_test",
227+
const formal_test_mod = b.createModule(.{
229228
.root_source_file = b.path("examples/demos/formal_test.zig"),
230229
.target = target,
231230
.optimize = optimize,
232231
});
232+
formal_test_mod.addImport("ora_lib", lib_mod);
233233

234-
formal_test.root_module.addImport("ora_lib", lib_mod);
234+
const formal_test = b.addExecutable(.{
235+
.name = "formal_test",
236+
.root_module = formal_test_mod,
237+
});
235238
// Don't install by default - only run when requested
236239

237240
const formal_test_step = b.step("formal-test", "Run formal verification test");
@@ -333,12 +336,16 @@ fn buildSolidityLibrariesImpl(step: *std.Build.Step, options: std.Build.Step.Mak
333336

334337
/// Build the Yul wrapper C++ library
335338
fn buildYulWrapper(b: *std.Build, target: std.Build.ResolvedTarget, optimize: std.builtin.OptimizeMode, cmake_step: *std.Build.Step) *std.Build.Step.Compile {
336-
const yul_wrapper = b.addObject(.{
337-
.name = "yul_wrapper",
339+
const yul_wrapper_mod = b.createModule(.{
338340
.target = target,
339341
.optimize = optimize,
340342
});
341343

344+
const yul_wrapper = b.addObject(.{
345+
.name = "yul_wrapper",
346+
.root_module = yul_wrapper_mod,
347+
});
348+
342349
// Depend on CMake build
343350
yul_wrapper.step.dependOn(cmake_step);
344351

0 commit comments

Comments
 (0)