aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/dist
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2023-06-30 16:33:49 -0400
committerAustin Clements <austin@google.com>2023-08-22 19:18:23 +0000
commit72946ae8674a295e7485982fe57c65c7142b2c14 (patch)
treea3458c7ed5a9306dcd1a2f261e5112f35329b9b3 /src/cmd/dist
parent596120fdc6075c5789eae3a5caaf57639e7d18a3 (diff)
downloadgo-72946ae8674a295e7485982fe57c65c7142b2c14.tar.gz
go-72946ae8674a295e7485982fe57c65c7142b2c14.zip
cmd/asm,cmd/dist,cmd/go: remove asm -compiling-runtime flag
Currently, dist and go pass a -compiling-runtime flag to asm if they're compiling a runtime package. However, now that we always pass the package path to asm, it can make that determination just as well as its callers can. This CL moves that check into asm and drops the flag. This in turn makes dist's copy of IsRuntimePackagePath unnecessary, so we delete it. Change-Id: I6ecf2d50b5b83965012af34dbe5f9a973ba0778b Reviewed-on: https://go-review.googlesource.com/c/go/+/521697 Run-TryBot: Austin Clements <austin@google.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
Diffstat (limited to 'src/cmd/dist')
-rw-r--r--src/cmd/dist/build.go26
1 files changed, 0 insertions, 26 deletions
diff --git a/src/cmd/dist/build.go b/src/cmd/dist/build.go
index 0afa5f062e..031a8d9013 100644
--- a/src/cmd/dist/build.go
+++ b/src/cmd/dist/build.go
@@ -892,9 +892,6 @@ func runInstall(pkg string, ch chan struct{}) {
}
}
goasmh := pathf("%s/go_asm.h", workdir)
- if IsRuntimePackagePath(pkg) {
- asmArgs = append(asmArgs, "-compiling-runtime")
- }
// Collect symabis from assembly code.
var symabis string
@@ -1947,29 +1944,6 @@ func cmdlist() {
}
}
-// IsRuntimePackagePath examines 'pkgpath' and returns TRUE if it
-// belongs to the collection of "runtime-related" packages, including
-// "runtime" itself, "reflect", "syscall", and the
-// "runtime/internal/*" packages.
-//
-// Keep in sync with cmd/internal/objabi/path.go:IsRuntimePackagePath.
-func IsRuntimePackagePath(pkgpath string) bool {
- rval := false
- switch pkgpath {
- case "runtime":
- rval = true
- case "reflect":
- rval = true
- case "syscall":
- rval = true
- case "internal/bytealg":
- rval = true
- default:
- rval = strings.HasPrefix(pkgpath, "runtime/internal")
- }
- return rval
-}
-
func setNoOpt() {
for _, gcflag := range strings.Split(gogcflags, " ") {
if gcflag == "-N" || gcflag == "-l" {