]> Cypherpunks repositories - gostls13.git/commit
cmd/go, cmd/link: make builds deterministic
authorDamien Neil <dneil@google.com>
Tue, 9 Feb 2016 01:20:59 +0000 (17:20 -0800)
committerDamien Neil <dneil@google.com>
Thu, 18 Feb 2016 20:56:29 +0000 (20:56 +0000)
commit5bbb98df0960f57dca73cb7640456608d4cc0917
tree54a730aab6ae44591d9eeebe44e35b13f4de93d3
parent1a94431a78c4de5182dd43b438701cca80455746
cmd/go, cmd/link: make builds deterministic

Add the following flags when supported by the compiler:
  -gno-record-gcc-switches
  -fdebug-prefix-map=$WORK=/tmp/go-build

Add an empty NAME symbol to the ELF .symtab. GNU ld will add a NAME
symbol when one is not present; including one of our own prevents it
from adding a reference to the link tempdir.

Fixes #13247 for compilers that support -fdebug-prefix-map. (gcc, clang
in the near future.)

Change-Id: I221c71fc59cd23ee8c99bcc038793ff4623c9ffc
Reviewed-on: https://go-review.googlesource.com/19363
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Damien Neil <dneil@google.com>
src/cmd/go/build.go
src/cmd/go/go_test.go
src/cmd/link/internal/ld/symtab.go