Hello,
I was doing some work on my OS and noticed how clang calls my host's GCC to perform linking, seemingly discarding -fuse-ld=lld. How come this is?
I would like for my OSes build environment to be completely isolated from the host's tools so that it doesn't rely on anything in the host. Also, I don't want to have whole layer extra where issues could prop up. How can I make clang use LLD directly for linking and not GCC?
Thanks,
nexos
Clang using GCC as linker?
Re: Clang using GCC as linker?
lld might be a stub which calls gcc. You could query your package manager to see if there's another package which provides lld.
`file $(which lld)` may show obvious signs of it being a stub, but don't rely on it.
`file $(which lld)` may show obvious signs of it being a stub, but don't rely on it.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Re: Clang using GCC as linker?
No, because running with -V shows gcc calling /usr/bin/ld.lld (since clang forwarded -fuse-ld=lld to gcc). It works fine currently, it's just that I'd like clang to call my custom built lld.
Re: Clang using GCC as linker?
I did the simplest thing: simple add the path of my LLD before /usr/bin. How simple