-
Notifications
You must be signed in to change notification settings - Fork 852
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
Use clang to do linking. #1538
base: dev
Are you sure you want to change the base?
Use clang to do linking. #1538
Conversation
I agree this is is an important cleanup. Unfortunately it fails to link, it appears to use the system linker even when cross compiling (which won't work with ld.bfd):
I think this can be fixed with an extra linker parameter I also see this error:
And this one, on MacOS:
I have a suspicion what is causing it, but maybe it's best to first try out the first fix to see how well it works. In short, the name |
I don't recall closing this... |
Thanks for the pointers. As a first step, I just copied the |
This avoids having to guess what the linker name-with-build-triplet is, as we can just pass the target to it in the same way as the compilation stage.
Oh, I missed that it was complaining about The configurations that actually run appear to still be using |
For MacOS, it looks like you're also switching the compiler (from And this:
Is only present when building LLVM statically, so I think something else needs to be done. Apparently Clang has a check to see whether lld is installed, but in this case it should ignore that and try to use it anyway (as lld is built into TinyGo when linking LLVM statically). |
This avoids having to guess what the linker name-with-build-triplet is, as we can just pass the target to it in the same way as the compilation stage.
Close #1536.