I wanted to know how the Go compiler selects the architecture for assembler files such as in 'sync/atomic'. Is there a compiler flag?
By default, the Go compiler targets the architecture you are running. You can set the GOARCH
environment variable to override this. See: https://golang.org/pkg/go/build/