Messages in this thread | | | From | Linus Torvalds <> | Date | Tue, 20 Jul 2021 14:11:16 -0700 | Subject | Re: [PATCH v2 2/2] Makefile: infer CROSS_COMPILE from SRCARCH for LLVM=1 LLVM_IAS=1 |
| |
On Tue, Jul 20, 2021 at 1:52 PM Nick Desaulniers <ndesaulniers@google.com> wrote: > > > -CC = $(CROSS_COMPILE)gcc > > +CC = $(CROSS_COMPILE)clang > > So you haven't been using LLD... :( (imagine using more than one > thread to link, and being faster than ld.gold)
I started out just building my own clang - nothing else.
And now that I'm using the distro clang, the linker isn't even _close_ to a performance issue. Since clang is a big, slow, bloated pig.
I posted profiles and performance numbers of clang being three times slower than gcc, and it was all just clang itself, not the linker. All due to insanely expensive startup costs.
I suspect a lot of clang users build bloated C++ code where the time to compile a single object file is so big that the startup costs don't even show up. But for the (fairly) lean C kernel header files that don't bring in millions of lines of headers for some template library, startup costs are a big deal.
So honestly, I don't care at all about "imagine being faster than ld.gold".
I can only _dream_ of clang itself not being 3x slower than gcc.
Linus
| |