🔧 Suppress Xcode 15+ linker warning by setting CGO_LDFLAGS environment variable in build script
This commit is contained in:
@@ -22,8 +22,10 @@ if [ "${1-}" = "--binary-only" ]; then
|
||||
fi
|
||||
|
||||
# 1. Build the Go binary.
|
||||
# Silence the Xcode 15+ linker warning "ignoring duplicate libraries: '-lobjc'"
|
||||
# emitted by Fyne/GLFW CGo packages passing -lobjc more than once.
|
||||
echo "==> building binary"
|
||||
go build -o "$APP_NAME" .
|
||||
CGO_LDFLAGS="-Wl,-no_warn_duplicate_libraries" go build -o "$APP_NAME" .
|
||||
|
||||
if [ "$BINARY_ONLY" -eq 1 ]; then
|
||||
echo "==> done (binary only): $APP_NAME"
|
||||
|
||||
Reference in New Issue
Block a user