https://codereview.appspot.com/123040043/diff/80001/src/cmd/link/testdata/Makefile File src/cmd/link/testdata/Makefile (right): https://codereview.appspot.com/123040043/diff/80001/src/cmd/link/testdata/Makefile#newcode12 src/cmd/link/testdata/Makefile:12: GOARCH=amd64 GOOS=darwin go tool 6a -trimpath=$$PWD $*.s On 2014/08/15 ...
10 years, 8 months ago
(2014-08-15 04:07:38 UTC)
#5
https://codereview.appspot.com/123040043/diff/80001/src/cmd/link/testdata/Mak...
File src/cmd/link/testdata/Makefile (right):
https://codereview.appspot.com/123040043/diff/80001/src/cmd/link/testdata/Mak...
src/cmd/link/testdata/Makefile:12: GOARCH=amd64 GOOS=darwin go tool 6a
-trimpath=$$PWD $*.s
On 2014/08/15 02:47:29, esk wrote:
> Did you mean to include this in your CL?
Yep, it's the titular change that actually fixes testdata generation for the
general $USER != "rsc" case. :-)
GOARCH=amd64 is necessary to be able to use 6a on !amd64 (I think; at least 8a
complains on amd64 if I don't set GOARCH=386).
GOOS=darwin is a bit optional, but it fixes an unnecessary variation between
generated .6 files across platforms. Also, cmd/ld complains when an object
file's goos value doesn't match the target OS when linking, and link_test.go is
specifically trying to link a darwin executable. Though cmd/link currently
doesn't enforce this (presumably since currently it only supports darwin
anyway).
-trimpath=$$PWD is so that the generated files won't contain the full path
information like "/Users/rsc/g/go/src/cmd/link/testdata/", which causes the
files to unnecessarily change depending on where your source tree is.
Issue 123040043: code review 123040043: cmd/link: fix testdata generation
(Closed)
Created 10 years, 9 months ago by mdempsky
Modified 10 years, 8 months ago
Reviewers: gobot
Base URL:
Comments: 4