build: silence duplicate -lobjc linker warning on Xcode 15+

Add -Wl,-no_warn_duplicate_libraries to the darwin cgo LDFLAGS and allow
it through the cgo flag allowlist via CGO_LDFLAGS_ALLOW in the build
scripts, so the ld-prime duplicate -lobjc note no longer clutters build
output.
This commit is contained in:
2026-07-07 14:16:24 +08:00
parent 778055cd1d
commit 85d5fcc722
3 changed files with 12 additions and 1 deletions
+3
View File
@@ -43,6 +43,9 @@ sleep 0.4
# --identity flag in v2.
ARCH="${ARCH:-arm64}"
echo "[dev-build.sh] building darwin/${ARCH}..."
# Allow the -Wl,-no_warn_duplicate_libraries flag declared in the darwin cgo
# files past Go's cgo LDFLAGS allowlist (see activation_policy_darwin.go).
export CGO_LDFLAGS_ALLOW='-Wl,-no_warn_duplicate_libraries'
wails build -platform "darwin/${ARCH}" -clean
# 5. Re-sign with the stable dev cert. We invoke sign.sh through env var