go build -gcflags -m
After some quick googling I can't find what the "m" flag does. Can anyone shed some light? go build -gcflags -m
After some quick googling I can't find what the "m" flag does. Can anyone shed some light? go build -gcflags
If you run `go help build`, you will see: -gcflags 'arg list'
arguments to pass on each 5g, 6g, or 8g compiler invocation.
Then you can run: go tool 6g
And see: -m print optimization decisionsIt helps in finding out details of what the compiler (Xg) thinks of various funcs inlining applicability (is that even a word?)
I know this isn't 'the right way' given that Go is supposed to be a safe language but it would be interesting to see how much difference it would make.
But I guess we are then going away from idiomatic Go
I looked at it more as an option for when you want to cram out possible extra performance of release builds.