diff options
| author | 2024-12-22 01:27:45 +0100 | |
|---|---|---|
| committer | 2024-12-22 01:27:45 +0100 | |
| commit | d95d0730e21147591317974a4c577b68d75bd2d5 (patch) | |
| tree | 3aeab1b583c0492e30af7bd2a1f3ff6fdd89c4ff /build.zig | |
| parent | Merge pull request #173 from vrischmann/fix-latest-zig (diff) | |
| download | zig-sqlite-d95d0730e21147591317974a4c577b68d75bd2d5.tar.gz zig-sqlite-d95d0730e21147591317974a4c577b68d75bd2d5.tar.xz zig-sqlite-d95d0730e21147591317974a4c577b68d75bd2d5.zip | |
build: the 'bundled' flag is uselessrefactor-build
Diffstat (limited to 'build.zig')
| -rw-r--r-- | build.zig | 52 |
1 files changed, 25 insertions, 27 deletions
| @@ -25,23 +25,22 @@ fn getTarget(original_target: ResolvedTarget) ResolvedTarget { | |||
| 25 | const TestTarget = struct { | 25 | const TestTarget = struct { |
| 26 | query: Query, | 26 | query: Query, |
| 27 | single_threaded: bool = false, | 27 | single_threaded: bool = false, |
| 28 | bundled: bool, | ||
| 29 | }; | 28 | }; |
| 30 | 29 | ||
| 31 | const ci_targets = switch (builtin.target.cpu.arch) { | 30 | const ci_targets = switch (builtin.target.cpu.arch) { |
| 32 | .x86_64 => switch (builtin.target.os.tag) { | 31 | .x86_64 => switch (builtin.target.os.tag) { |
| 33 | .linux => [_]TestTarget{ | 32 | .linux => [_]TestTarget{ |
| 34 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .abi = .musl }, .bundled = true }, | 33 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .abi = .musl } }, |
| 35 | TestTarget{ .query = .{ .cpu_arch = .x86, .abi = .musl }, .bundled = true }, | 34 | TestTarget{ .query = .{ .cpu_arch = .x86, .abi = .musl } }, |
| 36 | TestTarget{ .query = .{ .cpu_arch = .aarch64, .abi = .musl }, .bundled = true }, | 35 | TestTarget{ .query = .{ .cpu_arch = .aarch64, .abi = .musl } }, |
| 37 | }, | 36 | }, |
| 38 | .windows => [_]TestTarget{ | 37 | .windows => [_]TestTarget{ |
| 39 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .abi = .gnu }, .bundled = true }, | 38 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .abi = .gnu } }, |
| 40 | // Disabled due to https://github.com/ziglang/zig/issues/20047 | 39 | // Disabled due to https://github.com/ziglang/zig/issues/20047 |
| 41 | // TestTarget{ .query = .{ .cpu_arch = .x86, .abi = .gnu }, .bundled = true }, | 40 | // TestTarget{ .query = .{ .cpu_arch = .x86, .abi = .gnu } }, |
| 42 | }, | 41 | }, |
| 43 | .macos => [_]TestTarget{ | 42 | .macos => [_]TestTarget{ |
| 44 | TestTarget{ .query = .{ .cpu_arch = .x86_64 }, .bundled = true }, | 43 | TestTarget{ .query = .{ .cpu_arch = .x86_64 } }, |
| 45 | }, | 44 | }, |
| 46 | else => [_]TestTarget{}, | 45 | else => [_]TestTarget{}, |
| 47 | }, | 46 | }, |
| @@ -51,44 +50,44 @@ const ci_targets = switch (builtin.target.cpu.arch) { | |||
| 51 | const all_test_targets = switch (builtin.target.cpu.arch) { | 50 | const all_test_targets = switch (builtin.target.cpu.arch) { |
| 52 | .x86_64 => switch (builtin.target.os.tag) { | 51 | .x86_64 => switch (builtin.target.os.tag) { |
| 53 | .linux => [_]TestTarget{ | 52 | .linux => [_]TestTarget{ |
| 54 | TestTarget{ .query = .{}, .bundled = false }, | 53 | TestTarget{ .query = .{} }, |
| 55 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .abi = .musl }, .bundled = true }, | 54 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .abi = .musl } }, |
| 56 | TestTarget{ .query = .{ .cpu_arch = .x86, .abi = .musl }, .bundled = true }, | 55 | TestTarget{ .query = .{ .cpu_arch = .x86, .abi = .musl } }, |
| 57 | TestTarget{ .query = .{ .cpu_arch = .aarch64, .abi = .musl }, .bundled = true }, | 56 | TestTarget{ .query = .{ .cpu_arch = .aarch64, .abi = .musl } }, |
| 58 | TestTarget{ .query = .{ .cpu_arch = .riscv64, .abi = .musl }, .bundled = true }, | 57 | TestTarget{ .query = .{ .cpu_arch = .riscv64, .abi = .musl } }, |
| 59 | TestTarget{ .query = .{ .cpu_arch = .mips, .abi = .musl }, .bundled = true }, | 58 | TestTarget{ .query = .{ .cpu_arch = .mips, .abi = .musl } }, |
| 60 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .os_tag = .windows }, .bundled = true }, | 59 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .os_tag = .windows } }, |
| 61 | // Disabled due to https://github.com/ziglang/zig/issues/20047 | 60 | // Disabled due to https://github.com/ziglang/zig/issues/20047 |
| 62 | // TestTarget{ .query = .{ .cpu_arch = .x86, .os_tag = .windows }, .bundled = true }, | 61 | // TestTarget{ .query = .{ .cpu_arch = .x86, .os_tag = .windows } }, |
| 63 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .os_tag = .macos }, .bundled = true }, | 62 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .os_tag = .macos } }, |
| 64 | TestTarget{ .query = .{ .cpu_arch = .aarch64, .os_tag = .macos }, .bundled = true }, | 63 | TestTarget{ .query = .{ .cpu_arch = .aarch64, .os_tag = .macos } }, |
| 65 | }, | 64 | }, |
| 66 | .windows => [_]TestTarget{ | 65 | .windows => [_]TestTarget{ |
| 67 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .abi = .gnu }, .bundled = true }, | 66 | TestTarget{ .query = .{ .cpu_arch = .x86_64, .abi = .gnu } }, |
| 68 | // Disabled due to https://github.com/ziglang/zig/issues/20047 | 67 | // Disabled due to https://github.com/ziglang/zig/issues/20047 |
| 69 | // TestTarget{ .query = .{ .cpu_arch = .x86, .abi = .gnu }, .bundled = true }, | 68 | // TestTarget{ .query = .{ .cpu_arch = .x86, .abi = .gnu } }, |
| 70 | }, | 69 | }, |
| 71 | .freebsd => [_]TestTarget{ | 70 | .freebsd => [_]TestTarget{ |
| 72 | TestTarget{ .query = .{}, .bundled = false }, | 71 | TestTarget{ .query = .{} }, |
| 73 | TestTarget{ .query = .{ .cpu_arch = .x86_64 }, .bundled = true }, | 72 | TestTarget{ .query = .{ .cpu_arch = .x86_64 } }, |
| 74 | }, | 73 | }, |
| 75 | .macos => [_]TestTarget{ | 74 | .macos => [_]TestTarget{ |
| 76 | TestTarget{ .query = .{ .cpu_arch = .x86_64 }, .bundled = true }, | 75 | TestTarget{ .query = .{ .cpu_arch = .x86_64 } }, |
| 77 | }, | 76 | }, |
| 78 | else => [_]TestTarget{ | 77 | else => [_]TestTarget{ |
| 79 | TestTarget{ .query = .{}, .bundled = false }, | 78 | TestTarget{ .query = .{} }, |
| 80 | }, | 79 | }, |
| 81 | }, | 80 | }, |
| 82 | .aarch64 => switch (builtin.target.os.tag) { | 81 | .aarch64 => switch (builtin.target.os.tag) { |
| 83 | .linux, .windows, .freebsd, .macos => [_]TestTarget{ | 82 | .linux, .windows, .freebsd, .macos => [_]TestTarget{ |
| 84 | TestTarget{ .query = .{}, .bundled = true }, | 83 | TestTarget{ .query = .{} }, |
| 85 | }, | 84 | }, |
| 86 | else => [_]TestTarget{ | 85 | else => [_]TestTarget{ |
| 87 | TestTarget{ .query = .{}, .bundled = false }, | 86 | TestTarget{ .query = .{} }, |
| 88 | }, | 87 | }, |
| 89 | }, | 88 | }, |
| 90 | else => [_]TestTarget{ | 89 | else => [_]TestTarget{ |
| 91 | TestTarget{ .query = .{}, .bundled = false }, | 90 | TestTarget{ .query = .{} }, |
| 92 | }, | 91 | }, |
| 93 | }; | 92 | }; |
| 94 | 93 | ||
| @@ -178,7 +177,6 @@ pub fn build(b: *std.Build) !void { | |||
| 178 | 177 | ||
| 179 | const test_targets = computeTestTargets(query.isNative(), ci) orelse &[_]TestTarget{.{ | 178 | const test_targets = computeTestTargets(query.isNative(), ci) orelse &[_]TestTarget{.{ |
| 180 | .query = query, | 179 | .query = query, |
| 181 | .bundled = true, | ||
| 182 | }}; | 180 | }}; |
| 183 | const test_step = b.step("test", "Run library tests"); | 181 | const test_step = b.step("test", "Run library tests"); |
| 184 | 182 | ||