| ... | ... | @@ -1,25 +1,13 @@ |
| 1 | 1 | const std = @import("std"); |
| 2 | | const builtin = @import("builtin"); |
| 3 | 2 | const Builder = std.build.Builder; |
| 4 | 3 | const LibExeObjectStep = std.build.LibExeObjStep; |
| 5 | 4 | |
| 6 | 5 | pub fn build(b: *Builder) void { |
| 7 | 6 | const test_step = b.step("test", "Test"); |
| 8 | 7 | test_step.dependOn(b.getInstallStep()); |
| 9 | | |
| 10 | | switch (builtin.cpu.arch) { |
| 11 | | .aarch64 => { |
| 12 | | testUuid(b, test_step, .ReleaseSafe, "eb1203019e453d808d4f1e71053af9af"); |
| 13 | | testUuid(b, test_step, .ReleaseFast, "eb1203019e453d808d4f1e71053af9af"); |
| 14 | | testUuid(b, test_step, .ReleaseSmall, "eb1203019e453d808d4f1e71053af9af"); |
| 15 | | }, |
| 16 | | .x86_64 => { |
| 17 | | testUuid(b, test_step, .ReleaseSafe, "b3598e7c42dc38b0bd2975ead6e4ae85"); |
| 18 | | testUuid(b, test_step, .ReleaseFast, "b3598e7c42dc38b0bd2975ead6e4ae85"); |
| 19 | | testUuid(b, test_step, .ReleaseSmall, "1064b25eef4e3e6391866188b3dd7156"); |
| 20 | | }, |
| 21 | | else => unreachable, |
| 22 | | } |
| 8 | testUuid(b, test_step, .ReleaseSafe, "eb1203019e453d808d4f1e71053af9af"); |
| 9 | testUuid(b, test_step, .ReleaseFast, "eb1203019e453d808d4f1e71053af9af"); |
| 10 | testUuid(b, test_step, .ReleaseSmall, "eb1203019e453d808d4f1e71053af9af"); |
| 23 | 11 | } |
| 24 | 12 | |
| 25 | 13 | fn testUuid(b: *Builder, test_step: *std.build.Step, mode: std.builtin.Mode, comptime exp: []const u8) void { |
| ... | ... | @@ -45,7 +33,7 @@ fn testUuid(b: *Builder, test_step: *std.build.Step, mode: std.builtin.Mode, com |
| 45 | 33 | fn simpleDylib(b: *Builder, mode: std.builtin.Mode) *LibExeObjectStep { |
| 46 | 34 | const dylib = b.addSharedLibrary("test", null, b.version(1, 0, 0)); |
| 47 | 35 | dylib.setBuildMode(mode); |
| 48 | | dylib.setTarget(.{ .os_tag = .macos }); |
| 36 | dylib.setTarget(.{ .cpu_arch = .aarch64, .os_tag = .macos }); |
| 49 | 37 | dylib.addCSourceFile("test.c", &.{}); |
| 50 | 38 | dylib.linkLibC(); |
| 51 | 39 | return dylib; |