From 48f7dcc1dede64ee51e9bee8b0944e24be62a731 Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Sun, 14 Apr 2024 18:17:30 +0200 Subject: build: use the already defined sqlite module --- build.zig | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/build.zig b/build.zig index b3ea7d2..cd617f7 100644 --- a/build.zig +++ b/build.zig @@ -399,9 +399,7 @@ pub fn build(b: *std.Build) !void { fuzz_lib.linkLibrary(lib); fuzz_lib.want_lto = true; fuzz_lib.bundle_compiler_rt = true; - fuzz_lib.root_module.addImport("sqlite", b.createModule(.{ - .root_source_file = .{ .path = "sqlite.zig" }, - })); + fuzz_lib.root_module.addImport("sqlite", sqlite_mod); // Setup the output name const fuzz_executable_name = "fuzz"; @@ -430,9 +428,7 @@ pub fn build(b: *std.Build) !void { }); fuzz_debug_exe.addIncludePath(.{ .path = "c" }); fuzz_debug_exe.linkLibrary(lib); - fuzz_debug_exe.root_module.addImport("sqlite", b.createModule(.{ - .root_source_file = .{ .path = "sqlite.zig" }, - })); + fuzz_debug_exe.root_module.addImport("sqlite", sqlite_mod); // Only install fuzz-debug when the fuzz step is run const install_fuzz_debug_exe = b.addInstallArtifact(fuzz_debug_exe, .{}); @@ -454,9 +450,7 @@ pub fn build(b: *std.Build) !void { .optimize = optimize, }); zigcrypto_loadable_ext.addIncludePath(.{ .path = "c" }); - zigcrypto_loadable_ext.root_module.addImport("sqlite", b.createModule(.{ - .root_source_file = .{ .path = "sqlite.zig" }, - })); + zigcrypto_loadable_ext.root_module.addImport("sqlite", sqlite_mod); zigcrypto_loadable_ext.linkLibrary(lib); const install_zigcrypto_loadable_ext = b.addInstallArtifact(zigcrypto_loadable_ext, .{}); @@ -468,9 +462,7 @@ pub fn build(b: *std.Build) !void { .optimize = optimize, }); zigcrypto_test.addIncludePath(.{ .path = "c" }); - zigcrypto_test.root_module.addImport("sqlite", b.createModule(.{ - .root_source_file = .{ .path = "sqlite.zig" }, - })); + zigcrypto_test.root_module.addImport("sqlite", sqlite_mod); zigcrypto_test.linkLibrary(lib); const install_zigcrypto_test = b.addInstallArtifact(zigcrypto_test, .{}); -- cgit v1.2.3