From 7ea0520234aafb47d05bb4822cb7af54c6ac7554 Mon Sep 17 00:00:00 2001 From: Michael Matloob Date: Wed, 21 Sep 2022 15:51:27 -0400 Subject: 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 TryBot-Result: Gopher Robot Run-TryBot: Michael Matloob Reviewed-by: Bryan Mills --- src/cmd/objdump/objdump_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/cmd/objdump/objdump_test.go') 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 { -- cgit v1.3-5-g9baa