diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-01 01:23:09 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-01 01:23:09 +0000 |
commit | 3eba09884e5f228d8c044c85617009e2aa7ad342 (patch) | |
tree | 4c693136f7e1eb3a87c490d4e83683dbb9b7d45d /libgo | |
parent | 5b2eaa1170aa135450a1180a525bf1ed7c34eb3a (diff) | |
download | gcc-3eba09884e5f228d8c044c85617009e2aa7ad342.zip gcc-3eba09884e5f228d8c044c85617009e2aa7ad342.tar.gz gcc-3eba09884e5f228d8c044c85617009e2aa7ad342.tar.bz2 |
cmd/go: add -O2 to invocation of gccgo
When using the go tool with gccgo, this changes the default
compilation to use -O2. The -gccgoflags option can be used to
override this default. I think this change better corresponds to what
people expect when using the go tool.
Reviewed-on: https://go-review.googlesource.com/c/164378
From-SVN: r269299
Diffstat (limited to 'libgo')
-rw-r--r-- | libgo/go/cmd/go/internal/work/gccgo.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/go/cmd/go/internal/work/gccgo.go b/libgo/go/cmd/go/internal/work/gccgo.go index 6311d65..3c55870 100644 --- a/libgo/go/cmd/go/internal/work/gccgo.go +++ b/libgo/go/cmd/go/internal/work/gccgo.go @@ -76,7 +76,7 @@ func (tools gccgoToolchain) gc(b *Builder, a *Action, archive string, importcfg gcargs = append(gcargs, "-fgo-relative-import-path="+p.Internal.LocalPrefix) } - args := str.StringList(tools.compiler(), "-c", gcargs, "-o", ofile, forcedGccgoflags) + args := str.StringList(tools.compiler(), "-c", "-O2", gcargs, "-o", ofile, forcedGccgoflags) if importcfg != nil { if b.gccSupportsFlag(args[:1], "-fgo-importcfg=/dev/null") { if err := b.writeFile(objdir+"importcfg", importcfg); err != nil { |