go-ios
go-ios copied to clipboard
fix(Makefile): use native GOOS/GOARCH by default
The Makefile attempts to determine the target OS/arch so that it can specify GOOS
/GOARCH
explicitly when calling go
.
This doesn't really achieve anything as it ends up competing with the same default behavior of go
as well as the user's own configured environment.
Furthermore, it causes the build to fail on newer Apple silicon Macs, where uname -m
reports arm64
(not aarch64
expected by the Makefile).
This change removes the behavior that always-overrides GOARCH
. The user can either specify GOOS
and GOARCH
in the Makefile where commented, or they can simply export the variables through their environment and the Makefile will respect them.
Otherwise, do not override GOARCH
or GOOS
within the Makefile. Let the go
toolchain figure it out as intended.