Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to compile LLVM with a specific target

For some reason the compile speed of LLVM is extremely slow on my Mac, and based on my observation most of the time is spend on compiling the different target in llvm/lib/Target.

However, the only target I need is X86, so I'm wondering is there a way to specify the target I want to compile so that the LLVM will only compile that target and save a lot of time?

like image 783
C0deZ Avatar asked Jun 02 '26 04:06

C0deZ


1 Answers

You can pass -DLLVM_TARGETS_TO_BUILD=X86 to the initial cmake invocation.

like image 179
Ismail Badawi Avatar answered Jun 04 '26 12:06

Ismail Badawi



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!