CGO_CFLAGS confusion

Hey guys.

As part of my code, I’m trying to call // #cgo CFLAGS: -maes in the preamble for some go file.
I am getting the following error:
invalid flag in #cgo CFLAGS: -maes
as my go env looks like:

$ go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/fk/k55042510k50rt787ys8tj3h0000gn/T/go-build138582346=/tmp/go-build -gno-record-gcc-switches -fno-common"

However, my local variables are set to CGO_CFLAGS_ALLOW='-maes -g -O2'. Any ideas on how to resolve this? I have verified that gcc -maes filename.c works.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.