-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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/link: Linking with a non-clang linker fails when the path contains the string "clang" #45241
Comments
I think I understand your problem, but I'm not sure I followed what you meant here with the "fix'. I guess we could check if the C linker is clang by running |
maybe it should have been |
Something like:
|
What if we just use |
Change https://golang.org/cl/304692 mentions this issue: |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?The following code in
go/src/cmd/link/internal/ld/lib.go
Line 1478 in 74fe516
Fix: If you want to know whether clang is being used, search the filename, not the entire path.
What did you do?
Build a project with a toolchain under a path with the string "clang". For example, /home/clanger/compiler/bin/g++.
What did you expect to see?
Linking should succeed.
What did you see instead?
Linking failed.
The text was updated successfully, but these errors were encountered: