From 7b2b478b604cacf4b14044918201497b2351de4d Mon Sep 17 00:00:00 2001 From: lv <132778382+lv37@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:38:14 +0100 Subject: [PATCH 1/2] Add an option to cross compile to macos-86_64 --- build.vsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build.vsh b/build.vsh index e552669f..186062d0 100644 --- a/build.vsh +++ b/build.vsh @@ -39,6 +39,8 @@ fn (m ReleaseMode) compile_cmd() string { } cflags := $if cross_compile_macos_arm64 ? { '-cflags "-target arm64-apple-darwin"' + } $else $if cross_compile_macos_x86_64 ? { + '-cflags "-target x86_64-apple-darwin"' } $else $if linux { if m == .release { '-cflags -static' } else { '' } } $else { From daa502f3ff6cf44a515a296559cfa294d3cc253c Mon Sep 17 00:00:00 2001 From: lv <132778382+lv37@users.noreply.github.com> Date: Tue, 12 Nov 2024 13:42:32 +0100 Subject: [PATCH 2/2] Fix wrong compilation target --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d4cfa0cb..09979ad2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,6 +36,7 @@ jobs: os: ubuntu-20.04 - target: darwin-x86_64 os: macos-latest + vflags: -d cross_compile_macos_x86_64 - target: darwin-arm64 os: macos-latest vflags: -d cross_compile_macos_arm64