Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/link: internal linking for GOOS=linux, -buildmode=plugin #18157
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
Cross compiling plugins needs to use external linking, and therefore you need to have cross compiling toolchain for the target platform installed. i.e. for the first case, you need linux toolchain installed on Darwin and for the 2nd case, you need darwin toolchain install on Linux.
Better error handling is covered by #16395, any solution to that will work here.
There are two potential feature requests here, the first is internal linking of plugins which don't use cgo when GOOS=linux, the second is the same for GOOS=darwin.
Let's turn this issue into a feature request for GOOS=linux, -buildmode=plugin internal linking. It's not a priority for me, but it's an entirely reasonable feature request.
@urso if you want, you can file a separate bug for GOOS=darwin, -buildmode=plugin internal linking.