diff options
| author | 2024-04-14 18:17:30 +0200 | |
|---|---|---|
| committer | 2024-04-14 18:21:48 +0200 | |
| commit | 48f7dcc1dede64ee51e9bee8b0944e24be62a731 (patch) | |
| tree | 3e9d04c54912a66e7c1d119e893a7f778f082066 /build.zig | |
| parent | build: disable PIE (diff) | |
| download | zig-sqlite-48f7dcc1dede64ee51e9bee8b0944e24be62a731.tar.gz zig-sqlite-48f7dcc1dede64ee51e9bee8b0944e24be62a731.tar.xz zig-sqlite-48f7dcc1dede64ee51e9bee8b0944e24be62a731.zip | |
build: use the already defined sqlite module
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 16 |
1 files changed, 4 insertions, 12 deletions
| @@ -399,9 +399,7 @@ pub fn build(b: *std.Build) !void { | |||
| 399 | fuzz_lib.linkLibrary(lib); | 399 | fuzz_lib.linkLibrary(lib); |
| 400 | fuzz_lib.want_lto = true; | 400 | fuzz_lib.want_lto = true; |
| 401 | fuzz_lib.bundle_compiler_rt = true; | 401 | fuzz_lib.bundle_compiler_rt = true; |
| 402 | fuzz_lib.root_module.addImport("sqlite", b.createModule(.{ | 402 | fuzz_lib.root_module.addImport("sqlite", sqlite_mod); |
| 403 | .root_source_file = .{ .path = "sqlite.zig" }, | ||
| 404 | })); | ||
| 405 | 403 | ||
| 406 | // Setup the output name | 404 | // Setup the output name |
| 407 | const fuzz_executable_name = "fuzz"; | 405 | const fuzz_executable_name = "fuzz"; |
| @@ -430,9 +428,7 @@ pub fn build(b: *std.Build) !void { | |||
| 430 | }); | 428 | }); |
| 431 | fuzz_debug_exe.addIncludePath(.{ .path = "c" }); | 429 | fuzz_debug_exe.addIncludePath(.{ .path = "c" }); |
| 432 | fuzz_debug_exe.linkLibrary(lib); | 430 | fuzz_debug_exe.linkLibrary(lib); |
| 433 | fuzz_debug_exe.root_module.addImport("sqlite", b.createModule(.{ | 431 | fuzz_debug_exe.root_module.addImport("sqlite", sqlite_mod); |
| 434 | .root_source_file = .{ .path = "sqlite.zig" }, | ||
| 435 | })); | ||
| 436 | 432 | ||
| 437 | // Only install fuzz-debug when the fuzz step is run | 433 | // Only install fuzz-debug when the fuzz step is run |
| 438 | const install_fuzz_debug_exe = b.addInstallArtifact(fuzz_debug_exe, .{}); | 434 | const install_fuzz_debug_exe = b.addInstallArtifact(fuzz_debug_exe, .{}); |
| @@ -454,9 +450,7 @@ pub fn build(b: *std.Build) !void { | |||
| 454 | .optimize = optimize, | 450 | .optimize = optimize, |
| 455 | }); | 451 | }); |
| 456 | zigcrypto_loadable_ext.addIncludePath(.{ .path = "c" }); | 452 | zigcrypto_loadable_ext.addIncludePath(.{ .path = "c" }); |
| 457 | zigcrypto_loadable_ext.root_module.addImport("sqlite", b.createModule(.{ | 453 | zigcrypto_loadable_ext.root_module.addImport("sqlite", sqlite_mod); |
| 458 | .root_source_file = .{ .path = "sqlite.zig" }, | ||
| 459 | })); | ||
| 460 | zigcrypto_loadable_ext.linkLibrary(lib); | 454 | zigcrypto_loadable_ext.linkLibrary(lib); |
| 461 | 455 | ||
| 462 | const install_zigcrypto_loadable_ext = b.addInstallArtifact(zigcrypto_loadable_ext, .{}); | 456 | const install_zigcrypto_loadable_ext = b.addInstallArtifact(zigcrypto_loadable_ext, .{}); |
| @@ -468,9 +462,7 @@ pub fn build(b: *std.Build) !void { | |||
| 468 | .optimize = optimize, | 462 | .optimize = optimize, |
| 469 | }); | 463 | }); |
| 470 | zigcrypto_test.addIncludePath(.{ .path = "c" }); | 464 | zigcrypto_test.addIncludePath(.{ .path = "c" }); |
| 471 | zigcrypto_test.root_module.addImport("sqlite", b.createModule(.{ | 465 | zigcrypto_test.root_module.addImport("sqlite", sqlite_mod); |
| 472 | .root_source_file = .{ .path = "sqlite.zig" }, | ||
| 473 | })); | ||
| 474 | zigcrypto_test.linkLibrary(lib); | 466 | zigcrypto_test.linkLibrary(lib); |
| 475 | 467 | ||
| 476 | const install_zigcrypto_test = b.addInstallArtifact(zigcrypto_test, .{}); | 468 | const install_zigcrypto_test = b.addInstallArtifact(zigcrypto_test, .{}); |