diff options
Diffstat (limited to '')
| -rw-r--r-- | build.zig | 15 |
1 files changed, 15 insertions, 0 deletions
| @@ -183,6 +183,21 @@ pub fn build(b: *std.build.Builder) !void { | |||
| 183 | const target = b.standardTargetOptions(.{}); | 183 | const target = b.standardTargetOptions(.{}); |
| 184 | const mode = b.standardReleaseOptions(); | 184 | const mode = b.standardReleaseOptions(); |
| 185 | 185 | ||
| 186 | // Tool to preprocess the sqlite header files. | ||
| 187 | // | ||
| 188 | // Due to limitations of translate-c the standard header files can't be used for building loadable extensions | ||
| 189 | // so we have this tool which creates usable header files. | ||
| 190 | |||
| 191 | const preprocess_files_tool = b.addExecutable("preprocess-files", "tools/preprocess_files.zig"); | ||
| 192 | preprocess_files_tool.setBuildMode(mode); | ||
| 193 | preprocess_files_tool.setTarget(getTarget(target, true)); | ||
| 194 | |||
| 195 | // Add a top-level step to run the preprocess-files tool | ||
| 196 | const preprocess_files_run = b.step("preprocess-files", "Run the preprocess-files tool"); | ||
| 197 | |||
| 198 | const preprocess_files_tool_run = preprocess_files_tool.run(); | ||
| 199 | preprocess_files_run.dependOn(&preprocess_files_tool_run.step); | ||
| 200 | |||
| 186 | // If the target is native we assume the user didn't change it with -Dtarget and run all test targets. | 201 | // If the target is native we assume the user didn't change it with -Dtarget and run all test targets. |
| 187 | // Otherwise we run a single test target. | 202 | // Otherwise we run a single test target. |
| 188 | const test_targets = if (target.isNative()) | 203 | const test_targets = if (target.isNative()) |