Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gollvm: invalid argument to -O flag: fast #56484

Open
alexanius opened this issue Oct 29, 2022 · 2 comments
Open

gollvm: invalid argument to -O flag: fast #56484

alexanius opened this issue Oct 29, 2022 · 2 comments
Labels
FeatureRequest help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@alexanius
Copy link

What version of Go are you using (go version)?

$ go version
go version go1.18 gollvm LLVM 15.0.0git 20221028 (experimental) linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/alex/.cache/go-build"
GOENV="/home/alex/.config/go/env"
GOEXE=""
GOEXPERIMENT="fieldtrack,regabiwrappers"
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/alex/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/alex/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/alex/test/gollvm/install"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/alex/test/gollvm/install/tools"
GOVCS=""
GOVERSION="go1.18 gollvm LLVM 15.0.0git 20221028 (experimental)"
GCCGO="/home/alex/test/gollvm/install/bin/llvm-goc"
GOAMD64="v1"
AR="ar"
CC="/usr/bin/cc"
CXX="/usr/bin/c++"
CGO_ENABLED="1"
GOMOD="/home/alex/test/go/test/bench/go1/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build712666364=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

$ go build -gccgoflags="-Ofast"
/home/alex/test/gollvm/install/bin/llvm-goc: invalid argument to -O flag: fast

What did you expect to see?

Successful build

What did you see instead?

Error

Is there any reason why gollvm does not support -Ofast optimization level? For example the gccgo works fine with this option. If there is no reason I can add a support of this feature.

@ianlancetaylor
Copy link
Contributor

CC @thanm

@ianlancetaylor ianlancetaylor added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 29, 2022
@ianlancetaylor ianlancetaylor added this to the gollvm milestone Oct 29, 2022
@thanm
Copy link
Contributor

thanm commented Oct 31, 2022

@alexanius patch welcome, the main reason this isn't supported is that nobody has expressed a need. I would imagine that it wouldn't be too much effort.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FeatureRequest help wanted NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants