how golang buildmode=c-shared without -fpic

315 views Asked by At

I want a dynamic library that build without -fPIC, so that I can keep multi instance in memory through loading a same library multi times, here is my env

go version go1.15.11 linux/amd64

go env
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build963217559=/tmp/go-build -gno-record-gcc-switches"

the problem is that the GOGCCFLAGS is not configurable, how can i run go build -buildmode=c-shared without -fPIC?

0

There are 0 answers