Open stefantalpalaru opened 3 months ago
I updated the title to be more general - to satisfy this ticket we just need to replace it with any working linker - not necessarily LLD.
Though the embedded LLD mentioned in the other ticket would be a nice touch - it would be a lot more work than the simple change you have above.
Whatever linker we select should be a widely available one, since we'd need to expect ponyc users to have it on their machines, as a dependency (unless we use an embedded LLD to completely remove the external dependency).
Support for mold
would be nice. I am using it with Rust, and it cuts compile times qiute significantly.
@burjui if mold is a drop in replacement for gold then you should be able to use it now on any platform where we are using gold.
Discussed in the sync call today.
It's unclear how "dead" gold
actually is, and it's still present on all the Linux distros we currently build for. Unless/until it starts to get dropped by other distros we build for, this probably won't be a priority. Whatever default it gets replaced with would need to be something that is present on all the distros that we need.
Note that if you're running on a system where gold
is not present, you can override the linker command with the CLI option --link-ldcmd
. See the help string for ponyc
for other CLI options.
The "gold" linker is being used on Linux, but Gentoo devs dropped support for it, after declaring it dead upstream: https://bugs.gentoo.org/936112
Replacing it with an external "lld" is as easy as:
This issue has been separated from the similarly named https://github.com/ponylang/ponyc/issues/1837