From 49db791a43fdf4afecc27336d84ca6ab780b7f77 Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Sun, 14 Apr 2024 18:10:28 +0200 Subject: fix for latest zig Also some major refactoring around the query parsing state. --- build.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index 70b5b56..f483f66 100644 --- a/build.zig +++ b/build.zig @@ -279,7 +279,7 @@ pub fn build(b: *std.Build) !void { .flags = &[_][]const u8{"-std=c99"}, }); sqlite_lib.linkLibC(); - sqlite_lib.installHeader("c/sqlite3.h", "sqlite3.h"); + sqlite_lib.installHeader(.{ .path = "c/sqlite3.h" }, "sqlite3.h"); b.installArtifact(sqlite_lib); -- cgit v1.2.3 From faa599b7ab71ba01c0d1f47351fa4bc8767670eb Mon Sep 17 00:00:00 2001 From: Vincent Rischmann Date: Sun, 14 Apr 2024 18:11:26 +0200 Subject: build: disable PIE --- build.zig | 1 - 1 file changed, 1 deletion(-) (limited to 'build.zig') diff --git a/build.zig b/build.zig index f483f66..b3ea7d2 100644 --- a/build.zig +++ b/build.zig @@ -453,7 +453,6 @@ pub fn build(b: *std.Build) !void { .target = getTarget(target, true), .optimize = optimize, }); - zigcrypto_loadable_ext.pie = true; zigcrypto_loadable_ext.addIncludePath(.{ .path = "c" }); zigcrypto_loadable_ext.root_module.addImport("sqlite", b.createModule(.{ .root_source_file = .{ .path = "sqlite.zig" }, -- cgit v1.2.3 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(-) (limited to 'build.zig') 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