summaryrefslogtreecommitdiff
path: root/build.zig
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2022-01-04 00:48:38 +0100
committerGravatar Vincent Rischmann2022-01-04 00:48:38 +0100
commit73779432622ee6f88fa6280be380e02966bd2e28 (patch)
tree03aecb9cfff7a309b4c90ccb45004c96d7a0c463 /build.zig
parentupdate sqlite bundled source code to 3.37.1 (diff)
downloadzig-sqlite-73779432622ee6f88fa6280be380e02966bd2e28.tar.gz
zig-sqlite-73779432622ee6f88fa6280be380e02966bd2e28.tar.xz
zig-sqlite-73779432622ee6f88fa6280be380e02966bd2e28.zip
build: add some comments to clarify what we're doing
Diffstat (limited to 'build.zig')
-rw-r--r--build.zig8
1 files changed, 8 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 5837e88..7098c98 100644
--- a/build.zig
+++ b/build.zig
@@ -153,6 +153,8 @@ pub fn build(b: *std.build.Builder) !void {
153 153
154 const target = b.standardTargetOptions(.{}); 154 const target = b.standardTargetOptions(.{});
155 155
156 // If the target is native we assume the user didn't change it with -Dtarget and run all test targets.
157 // Otherwise we run a single test target.
156 const test_targets = if (target.isNative()) 158 const test_targets = if (target.isNative())
157 &all_test_targets 159 &all_test_targets
158 else 160 else
@@ -162,6 +164,12 @@ pub fn build(b: *std.build.Builder) !void {
162 }}; 164 }};
163 165
164 const test_step = b.step("test", "Run library tests"); 166 const test_step = b.step("test", "Run library tests");
167
168 // By default the tests will only be execute for native test targets, however they will be compiled
169 // for _all_ targets defined in `test_targets`.
170 //
171 // If you want to execute tests for other targets you can pass -fqemu, -fdarling, -fwine, -frosetta.
172
165 for (test_targets) |test_target| { 173 for (test_targets) |test_target| {
166 const bundled = use_bundled orelse test_target.bundled; 174 const bundled = use_bundled orelse test_target.bundled;
167 const cross_target = getTarget(test_target.target, bundled); 175 const cross_target = getTarget(test_target.target, bundled);