mirror of
https://github.com/golang/go
synced 2024-10-14 11:53:56 +00:00
cmd/compile: revert "remove -installsuffix flag"
This reverts CL 415236 (commit 558785a0a9
).
Reason for revert: Google's internal build system uses -installsuffix.
Restoring -installsuffix for Go 1.19, and will try again for Go 1.20.
Change-Id: Id6571f34f99f01bcf55e8e949e6fe7b6c1896134
Reviewed-on: https://go-review.googlesource.com/c/go/+/418036
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Matthew Dempsky <mdempsky@google.com>
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: David Chase <drchase@google.com>
This commit is contained in:
parent
c0c1bbde17
commit
967a3d985d
|
@ -68,6 +68,9 @@ Flags:
|
||||||
-importcfg file
|
-importcfg file
|
||||||
Read import configuration from file.
|
Read import configuration from file.
|
||||||
In the file, set importmap, packagefile to specify import resolution.
|
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
|
-l
|
||||||
Disable inlining.
|
Disable inlining.
|
||||||
-lang version
|
-lang version
|
||||||
|
|
|
@ -100,6 +100,7 @@ type CmdFlags struct {
|
||||||
GenDwarfInl int "help:\"generate DWARF inline info records\"" // 0=disabled, 1=funcs, 2=funcs+formals/locals
|
GenDwarfInl int "help:\"generate DWARF inline info records\"" // 0=disabled, 1=funcs, 2=funcs+formals/locals
|
||||||
GoVersion string "help:\"required version of the runtime\""
|
GoVersion string "help:\"required version of the runtime\""
|
||||||
ImportCfg func(string) "help:\"read import configuration from `file`\""
|
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\""
|
JSON string "help:\"version,file for JSON compiler/optimizer detail output\""
|
||||||
Lang string "help:\"Go language version source code expects\""
|
Lang string "help:\"Go language version source code expects\""
|
||||||
LinkObj string "help:\"write linker-specific object to `file`\""
|
LinkObj string "help:\"write linker-specific object to `file`\""
|
||||||
|
|
|
@ -102,7 +102,9 @@ func openPackage(path string) (*os.File, error) {
|
||||||
|
|
||||||
if buildcfg.GOROOT != "" {
|
if buildcfg.GOROOT != "" {
|
||||||
suffix := ""
|
suffix := ""
|
||||||
if base.Flag.Race {
|
if base.Flag.InstallSuffix != "" {
|
||||||
|
suffix = "_" + base.Flag.InstallSuffix
|
||||||
|
} else if base.Flag.Race {
|
||||||
suffix = "_race"
|
suffix = "_race"
|
||||||
} else if base.Flag.MSan {
|
} else if base.Flag.MSan {
|
||||||
suffix = "_msan"
|
suffix = "_msan"
|
||||||
|
|
|
@ -128,6 +128,9 @@ func (gcToolchain) gc(b *Builder, a *Action, archive string, importcfg, embedcfg
|
||||||
if extFiles == 0 {
|
if extFiles == 0 {
|
||||||
defaultGcFlags = append(defaultGcFlags, "-complete")
|
defaultGcFlags = append(defaultGcFlags, "-complete")
|
||||||
}
|
}
|
||||||
|
if cfg.BuildContext.InstallSuffix != "" {
|
||||||
|
defaultGcFlags = append(defaultGcFlags, "-installsuffix", cfg.BuildContext.InstallSuffix)
|
||||||
|
}
|
||||||
if a.buildID != "" {
|
if a.buildID != "" {
|
||||||
defaultGcFlags = append(defaultGcFlags, "-buildid", a.buildID)
|
defaultGcFlags = append(defaultGcFlags, "-buildid", a.buildID)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue