Odin
Odin copied to clipboard
Respect `-lld` CLI arg on non-windows machines
I noticed that it doesn't seem like the -lld
flag does anything on Linux & MacOS hosts. I just naively added a check and appended fuse-ld=lld
to the clang
args.
I'm not sure if this is the best way to do this, or if there are unintended side-effects of this change (such as changing the system_exec_command_line_app
call from ld-link
to lld-link
).
For more context of how I found this, see #3044
@Kelimion can be merged.. will see if that makes link times faster on linux/macOS as lld would be a bit faster then default old ld.
Works nicely for me, around 100ms faster just trying it out on some bigger projects
Glad to see this is getting some attention. New to Odin and I was looking for a way to choose which linker we wanted to use.
Was looking to see if someone already had the idea or not.
Instead of hard-coding a choice between LD & LLD, could we just instead have it accept -fuse-ld= arguments? So that way we can supply our own linker. I'd like to keep using mold, as I use it with my other c/rust projects? unless I am reading this PR wrong and that would be the intention then completely disregard my idiocy.