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

go tool compile #55111

Closed
shrirangadgaonkar-okta opened this issue Sep 16, 2022 · 1 comment
Closed

go tool compile #55111

shrirangadgaonkar-okta opened this issue Sep 16, 2022 · 1 comment

Comments

@shrirangadgaonkar-okta
Copy link

What version of Go are you using (go version)? 1.19.1 darwin/arm64

$ go version
go version go1.19.1 darwin/arm64

Does this issue reproduce with the latest release?

Yes

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

MacOS on M1

go env Output
$ go env

GO111MODULE=""
GOARCH="arm64"
GOBIN=""
GOCACHE="/Users/dev/Library/Caches/go-build"
GOENV="/Users/dev/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/dev/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/dev/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.19.1"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/dev/go/src/....../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 -arch arm64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/t9/p9vr0xbx5rz5n4j55dxc4s5w0000gp/T/go-build1811328283=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Build project with debug.

Here is a snippet of the makefile passing gcflags

GOFLAGS := ${GOFLAGS} -mod=vendor
ifneq ($(DEBUG), )
  GOFLAGS :=${GOFLAGS} -gcflags=all="-N -l"
...
...

--> $ DEBUG=1 make target

What did you expect to see?

standard output of files compiling and then soruces getting built.

DEBUG=1 make linux
mkdir -p ./build/linux_amd64
GOOS=linux GOARCH=amd64 go build  -mod= -mod=vendor -gcflags=all="-N" -v -o ./build/linux_amd64/diag ./infra/cmd/diag
internal/goarch
internal/unsafeheader
math/bits
internal/goos
unicode/utf8
internal/itoa
internal/goexperiment
...
...
...

What did you see instead?

DEBUG=1 make linux
mkdir -p ./build/linux_amd64
GOOS=linux GOARCH=amd64 go build  -mod= -mod=vendor -gcflags=all="-N -l" -v -o ./build/linux_amd64/diag ./infra/cmd/diag
go: parsing $GOFLAGS: unknown flag -l"
@seankhliao
Copy link
Member

Duplicate of #26849

@seankhliao seankhliao marked this as a duplicate of #26849 Sep 16, 2022
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Sep 16, 2022
@golang golang locked and limited conversation to collaborators Sep 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants