Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: support -linkmode=internal with Cgo #38918
What version of Go are you using (
Copying from my comment on #38917 :
Some cgo code relies on libraries that are written in C++. C++ code requires extra work from the linker to support things like global constructors and destructors and exception handling. If we can't invoke the external linker, we have to implement all of that code in cmd/link, and we have to maintain it as C++ changes.
This can be done, of course. I've done it myself in projects like the gold linker. But it's hard.