Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/internal/sys: BuildModeSupported reports c-shared is unsupported on windows/arm64 port, which supports cgo #46549

Closed
dmitshur opened this issue Jun 3, 2021 · 3 comments
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Milestone

Comments

@dmitshur
Copy link
Contributor

dmitshur commented Jun 3, 2021

At tip, sys.BuildModeSupported(runtime.Compiler, "c-shared", "windows", "arm64") reports false.

https://tip.golang.org/doc/go1.17#windows suggests the windows/arm64 port supports cgo, and discussion in CL 323970 CL 323992 points out that cgo support may imply that c-shared build mode should also be turned on, and possibly was missed. This issue is filed to ask and find out.

@rsc, do you know if sys.BuildModeSupported working as intended for Go 1.17 or does it need to be updated?

@dmitshur dmitshur added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Jun 3, 2021
@dmitshur dmitshur added this to the Go1.17 milestone Jun 3, 2021
@cherrymui
Copy link
Member

Supporting cgo doesn't necessarily mean c-shared build mode is supported, so the code in cmd/internal/sys isn't necessarily wrong. We have a few other platforms that support cgo but not c-shared build mode.

It might be that the c-shared mode "just works". We'd need to test it to be sure. But it may not work, and that is fine.

@cherrymui
Copy link
Member

and discussion in CL 323970 points out that cgo support may imply that c-shared build mode should also be turned on

I'm not sure how that CL is relevant to cgo or c-shared mode...

@dmitshur
Copy link
Contributor Author

dmitshur commented Jun 3, 2021

Thanks for answering Cherry. That suggests the current behavior of sys.BuildModeSupported is okay, and there can be a separate issue to track adding support for c-shared build mode for the windows/arm64 port.

I'm not sure how that CL is relevant to cgo or c-shared mode...

Sorry, I pasted the wrong CL number. Edited to say CL 323992 now.

I think we can close this since the original question is answered, and can reopen if more discussion is needed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made.
Projects
None yet
Development

No branches or pull requests

3 participants