How to build golang application for different architectures of mac book?
How to create universal binary that runs on amd64 and arm64(M Series) chips?
Here are the commands
code used: github.com/Jit...
Build for amd64 chipset
GOARCH=amd64 GOOS=darwin go build -o build/app_amd64 main.go
Build for arm64 chipset
GOARCH=armn64 GOOS=darwin go build -o build/app_arn64 main.go
Create universal binary :
lipo -create -output build/app_universal build/app_arm64 build/app_amd64
#programming #golangtutorial #macbook #devops #softwareengineer #rustland #rust #golanguage #java #python #cpp #compilation #clang #programmers #golang #rust #softwaredeveloper #
9 окт 2024