summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vincent Rischmann2022-01-04 00:54:54 +0100
committerGravatar Vincent Rischmann2022-01-04 00:54:56 +0100
commitbd38bc174e6c2e2bcd1d8579e59d1557793380e9 (patch)
tree25d17ad574d022cf862bf0ed039a0d9df7775f22
parentbuild: add some comments to clarify what we're doing (diff)
downloadzig-sqlite-bd38bc174e6c2e2bcd1d8579e59d1557793380e9.tar.gz
zig-sqlite-bd38bc174e6c2e2bcd1d8579e59d1557793380e9.tar.xz
zig-sqlite-bd38bc174e6c2e2bcd1d8579e59d1557793380e9.zip
build: add a windows cross-compilation test target
The tests will run in wine with `zig build -fwine test`
-rw-r--r--build.zig16
1 files changed, 16 insertions, 0 deletions
diff --git a/build.zig b/build.zig
index 7098c98..7b2e46f 100644
--- a/build.zig
+++ b/build.zig
@@ -48,6 +48,7 @@ const TestTarget = struct {
48const all_test_targets = switch (builtin.target.cpu.arch) { 48const all_test_targets = switch (builtin.target.cpu.arch) {
49 .x86_64 => switch (builtin.target.os.tag) { 49 .x86_64 => switch (builtin.target.os.tag) {
50 .linux => [_]TestTarget{ 50 .linux => [_]TestTarget{
51 // Targets linux but other CPU archs.
51 TestTarget{ 52 TestTarget{
52 .target = .{}, 53 .target = .{},
53 .bundled = false, 54 .bundled = false,
@@ -94,6 +95,21 @@ const all_test_targets = switch (builtin.target.cpu.arch) {
94 }, 95 },
95 .bundled = true, 96 .bundled = true,
96 }, 97 },
98 // Targets windows
99 TestTarget{
100 .target = .{
101 .cpu_arch = .x86_64,
102 .os_tag = .windows,
103 },
104 .bundled = true,
105 },
106 TestTarget{
107 .target = .{
108 .cpu_arch = .i386,
109 .os_tag = .windows,
110 },
111 .bundled = true,
112 },
97 }, 113 },
98 .windows => [_]TestTarget{ 114 .windows => [_]TestTarget{
99 TestTarget{ 115 TestTarget{