]> Cypherpunks repositories - gostls13.git/commit
cmd/go: insert goroot to the hash of build cache when the packages include C files
authorzhouguangyuan <zhouguangyuan.xian@gmail.com>
Fri, 10 Sep 2021 16:33:34 +0000 (00:33 +0800)
committerBryan C. Mills <bcmills@google.com>
Thu, 23 Sep 2021 15:10:56 +0000 (15:10 +0000)
commitabbfec2829b001cf758a058eba4ccdc940e029f4
treecc3e8e12ef81ff41134f083e64325e8f98fed49a
parentd0dd26a88c019d54f22463daae81e785f5867565
cmd/go: insert goroot to the hash of build cache when the packages include C files

There are some absolute paths in the object file of the packages include C files. The path in C objects file can't be rewritten by linker. The goroot must be used as input for the hash when the packages include C files. So that the debug_info of the binary is correctly.

Fixes #48319

Change-Id: I659a3d6d71c4e49fff83f5bcf53a0a417e552a93
Reviewed-on: https://go-review.googlesource.com/c/go/+/348991
Reviewed-by: Bryan C. Mills <bcmills@google.com>
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Meng Zhuo <mzh@golangcn.org>
Trust: Jay Conrod <jayconrod@google.com>
src/cmd/go/internal/work/exec.go
src/cmd/go/testdata/script/build_issue48319.txt [new file with mode: 0644]