What do these Go build flags mean? netgo -extldflags "-lm -lstdC ++ -static" '

I am currently pursuing an online microservice course where I deploy small application apps to docker containers. The long and ugly command line for creating binaries is as follows:

go build --tags netgo --ldflags '-extldflags "-lm -lstdc++ -static"' 

so far i just used go install to compile my go application.

Can someone explain this command to me?

+7
command-line compilation go
source share

No one has answered this question yet.

See related questions:

464
What does the number in parentheses after the Unix command names in manpages mean?
440
What does the compiler do on time (JIT)?
4
Can someone explain me the compilation step when creating the sqlcipher binary?
3
Golang Static Web Application Files with Docker Container
2
Error creating wxWidgets using the -j (jobs) option with MinGW
one
what's the best way to use command line applications in docker environment?
one
How to create utilities using the Go web application on Heroku?
0
run.sh binary file through revel <testapp> 'assembly does not work inside docker container
0
Compile Nmap as a static binary
0
docker-compose up does not create

All Articles