From 0371e5a5e0a6834db17b03b699f54856278cc776 Mon Sep 17 00:00:00 2001 From: Emil Lerch Date: Tue, 8 Feb 2022 22:36:36 -0800 Subject: [PATCH] add macos to CI --- .drone.yml | 2 ++ .gitignore | 1 + README.md | 3 +++ build.zig | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index 05dd7f3..b6da345 100644 --- a/.drone.yml +++ b/.drone.yml @@ -24,6 +24,8 @@ steps: - zig build -Dtarget=x86_64-windows - zig build -Dtarget=aarch64-linux - zig build -Dtarget=riscv64-linux + - zig build -Dtarget=x86_64-macos + - zig build -Dtarget=aarch64-macos - name: notify image: plugins/matrix when: diff --git a/.gitignore b/.gitignore index 95fba8a..1f526ad 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ src/models/ smithy/zig-out/ libs/ src/git_version.zig +zig-out diff --git a/README.md b/README.md index 187df33..6e94652 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,10 @@ This is for x86_linux. Tested targets: * aarch64-linux * x86_64-windows * arm-linux +* aarch64-macos +* x86_64-macos +Tested targets are built, but not continuously tested, by CI. ## Building diff --git a/build.zig b/build.zig index f6a8322..9101deb 100644 --- a/build.zig +++ b/build.zig @@ -30,7 +30,7 @@ pub fn build(b: *Builder) !void { exe.setTarget(target); exe.setBuildMode(mode); - exe.linkage = .static; + if (target.getOs().tag != .macos) exe.linkage = .static; // TODO: Strip doesn't actually fully strip the executable. If we're on // linux we can run strip on the result, probably at the expense