Sorry you're right, it's "otool -L" for macOS. And you say that if you cross-compile from Linux with 1.22.0 to build a macOS binary, you get a size approx 93.8MB as well? Very odd.
On Friday 9 February 2024 at 14:43:35 UTC cpu...@gmail.com wrote: > Yes, CGO is disabled. ldd doesn't seem to exist on MacOS: > > make build && ls -la ./evcc && otool -L ./evcc > > 1.21.7 > > CGO_ENABLED=0 go build -v -tags=release -trimpath -ldflags='-X > github.com/evcc-io/evcc/server.Version=0.124.1 -X > github.com/evcc-io/evcc/server.Commit=596071b42 -s -w' > -rwxr-xr-x 1 andig staff *93824418* 9 Feb 14:38 ./evcc > ./evcc: > /usr/lib/libSystem.B.dylib (compatibility version 0.0.0, current > version 0.0.0) > /usr/lib/libresolv.9.dylib (compatibility version 0.0.0, current > version 0.0.0) > > /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation > (compatibility version 0.0.0, current version 0.0.0) > /System/Library/Frameworks/Security.framework/Versions/A/Security > (compatibility version 0.0.0, current version 0.0.0) > > 1.22.0 > > CGO_ENABLED=0 go build -v -tags=release -trimpath -ldflags='-X > github.com/evcc-io/evcc/server.Version=0.124.1 -X > github.com/evcc-io/evcc/server.Commit=596071b42 -s -w' > -rwxr-xr-x 1 andig staff *81119026* 9 Feb 14:37 ./evcc > ./evcc: > /usr/lib/libSystem.B.dylib (compatibility version 0.0.0, current > version 0.0.0) > /usr/lib/libresolv.9.dylib (compatibility version 0.0.0, current > version 0.0.0) > > /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation > (compatibility version 0.0.0, current version 0.0.0) > /System/Library/Frameworks/Security.framework/Versions/A/Security > (compatibility version 0.0.0, current version 0.0.0) > > On Friday, February 9, 2024 at 2:22:36 PM UTC+1 Brian Candler wrote: > >> Have you at any point set CGO_ENABLED=0 ? >> >> What does "ldd /path/to/binary" show on both the old (larger) and new >> (smaller) binaries? Maybe one is dynamically linked and the other >> statically linked? >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/510198df-4b95-4c55-8cc1-a40c13703578n%40googlegroups.com.