Skip to content

Commit

Permalink
cmd/compile: remove -installsuffix flag
Browse files Browse the repository at this point in the history
Obsoleted by -importcfg.

cmd/link has a similar flag, but it seems to still be needed at least
for misc/cgo/testshared.TestGopathShlib. I can't immediately tell why
(has something to do with finding .so files), but it doesn't appear to
possibly affect cmd/compile.

Updates golang#51225.

Change-Id: I80c6aef860bd162c010ad4a1a4f532b400cf901c
Reviewed-on: https://go-review.googlesource.com/c/go/+/415236
Reviewed-by: David Chase <[email protected]>
Run-TryBot: Matthew Dempsky <[email protected]>
Reviewed-by: Russ Cox <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
  • Loading branch information
mdempsky committed Jul 13, 2022
1 parent 1355ea3 commit 558785a
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 10 deletions.
3 changes: 0 additions & 3 deletions src/cmd/compile/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ Flags:
-importcfg file
Read import configuration from file.
In the file, set importmap, packagefile to specify import resolution.
-installsuffix suffix
Look for packages in $GOROOT/pkg/$GOOS_$GOARCH_suffix
instead of $GOROOT/pkg/$GOOS_$GOARCH.
-l
Disable inlining.
-lang version
Expand Down
1 change: 0 additions & 1 deletion src/cmd/compile/internal/base/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ type CmdFlags struct {
GenDwarfInl int "help:\"generate DWARF inline info records\"" // 0=disabled, 1=funcs, 2=funcs+formals/locals
GoVersion string "help:\"required version of the runtime\""
ImportCfg func(string) "help:\"read import configuration from `file`\""
InstallSuffix string "help:\"set pkg directory `suffix`\""
JSON string "help:\"version,file for JSON compiler/optimizer detail output\""
Lang string "help:\"Go language version source code expects\""
LinkObj string "help:\"write linker-specific object to `file`\""
Expand Down
4 changes: 1 addition & 3 deletions src/cmd/compile/internal/noder/import.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,7 @@ func openPackage(path string) (*os.File, error) {

if buildcfg.GOROOT != "" {
suffix := ""
if base.Flag.InstallSuffix != "" {
suffix = "_" + base.Flag.InstallSuffix
} else if base.Flag.Race {
if base.Flag.Race {
suffix = "_race"
} else if base.Flag.MSan {
suffix = "_msan"
Expand Down
3 changes: 0 additions & 3 deletions src/cmd/go/internal/work/gc.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,6 @@ func (gcToolchain) gc(b *Builder, a *Action, archive string, importcfg, embedcfg
if extFiles == 0 {
defaultGcFlags = append(defaultGcFlags, "-complete")
}
if cfg.BuildContext.InstallSuffix != "" {
defaultGcFlags = append(defaultGcFlags, "-installsuffix", cfg.BuildContext.InstallSuffix)
}
if a.buildID != "" {
defaultGcFlags = append(defaultGcFlags, "-buildid", a.buildID)
}
Expand Down

0 comments on commit 558785a

Please sign in to comment.