aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/objdump
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2022-09-21 15:51:27 -0400
committerMichael Matloob <matloob@golang.org>2022-10-18 20:41:45 +0000
commit7ea0520234aafb47d05bb4822cb7af54c6ac7554 (patch)
treeb2759e2dd9643b302c7af23090d032e9d9e821f1 /src/cmd/objdump
parentb6e1a563fc142d7129a0ea6a3c6137ee12ff43f7 (diff)
downloadgo-7ea0520234aafb47d05bb4822cb7af54c6ac7554.tar.xz
go,cmd,internal: update to anticipate missing targets and .a files
go/build and cmd/go will stop returing Targets for stdlib .a files, and stop producing the .a files is pkg/GOOS_GOARCH. update tests to anticipate that and to pass in importcfgs instead of expecting the compiler can find .a files in their old locations. Adds code to determine locations of .a files to internal/goroot. Also adds internal/goroot to dist's bootstrap directories and changes internal/goroot to build with a bootstrap version of Go. Change-Id: Ie81e51105bddb3f0e374cbf47e81c23edfb67fa5 Reviewed-on: https://go-review.googlesource.com/c/go/+/442303 Reviewed-by: Michael Matloob <matloob@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/objdump')
-rw-r--r--src/cmd/objdump/objdump_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cmd/objdump/objdump_test.go b/src/cmd/objdump/objdump_test.go
index bbf942503a..fa6a1b9a68 100644
--- a/src/cmd/objdump/objdump_test.go
+++ b/src/cmd/objdump/objdump_test.go
@@ -297,8 +297,11 @@ func TestDisasmPIE(t *testing.T) {
func TestDisasmGoobj(t *testing.T) {
mustHaveDisasm(t)
+ importcfgfile := filepath.Join(tmp, "hello.importcfg")
+ testenv.WriteImportcfg(t, importcfgfile, nil)
+
hello := filepath.Join(tmp, "hello.o")
- args := []string{"tool", "compile", "-p=main", "-o", hello}
+ args := []string{"tool", "compile", "-p=main", "-importcfg=" + importcfgfile, "-o", hello}
args = append(args, "testdata/fmthello.go")
out, err := exec.Command(testenv.GoToolPath(t), args...).CombinedOutput()
if err != nil {