diff options
| author | 2022-01-04 00:54:54 +0100 | |
|---|---|---|
| committer | 2022-01-04 00:54:56 +0100 | |
| commit | bd38bc174e6c2e2bcd1d8579e59d1557793380e9 (patch) | |
| tree | 25d17ad574d022cf862bf0ed039a0d9df7775f22 /build.zig | |
| parent | build: add some comments to clarify what we're doing (diff) | |
| download | zig-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`
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 16 |
1 files changed, 16 insertions, 0 deletions
| @@ -48,6 +48,7 @@ const TestTarget = struct { | |||
| 48 | const all_test_targets = switch (builtin.target.cpu.arch) { | 48 | const 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{ |