[cfe-dev] clang multi-threaded compiling

James Courtier-Dutton via cfe-dev cfe-dev at lists.llvm.org
Fri Apr 2 03:48:05 PDT 2021


Hi,

I am working on a C++ project using Eclipse IDE.
When I edit some code, and then go to debug it, it takes time to compile
the one .cpp file I was editing, and then link it, and then the debugger
starts.
I have a 16 CPU Cores PC, but I have noticed for the use case:
"one compile then one link"
It is only using 1 CPU Core.
It is therefore slow to cycle between edit code, and debug it.
How do I get clang to use more than one core when compiling a single .cpp
file?
How do I get clang to use more than one core when linking?

Essentially, any way to speed up the "one compile then one link" use case
would help me.

The build tool is "ninja", so a way for ninja to use clang in this way
would help.

Kind Regards

James
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210402/cd4e99d0/attachment.html>


More information about the cfe-dev mailing list