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

cgo: select C++ for linking if any C++ code is present #16830

Closed
tdyas opened this issue Sep 12, 2022 · 0 comments · Fixed by #17018
Closed

cgo: select C++ for linking if any C++ code is present #16830

tdyas opened this issue Sep 12, 2022 · 0 comments · Fixed by #17018
Labels
backend: Go Go backend-related issues

Comments

@tdyas
Copy link
Contributor

tdyas commented Sep 12, 2022

When linking object files, the C++ linker should be used instead of the C linker if any C++ code is present. See https://github.com/golang/go/blob/54182ff54a687272dd7632c3a963e036ce03cb7c/src/cmd/go/internal/work/exec.go#L2411-L2415

@tdyas tdyas added the backend: Go Go backend-related issues label Sep 12, 2022
tdyas pushed a commit that referenced this issue Sep 28, 2022
Fix various bugs remaining in the cgo support. Add tests demonstrating that C++, Objective-C, and Fortran support works (when the system supports the applicable compiler/libraries).

Fixes #16836
Fixes #16830
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Go Go backend-related issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant