getsolus / ypkg

Modern, declarative, structured build format
https://getsol.us
GNU General Public License v3.0
22 stars 11 forks source link

Ensure LTO for GCC runs in parallel #9

Closed joebonrichie closed 3 years ago

joebonrichie commented 5 years ago

GCC's documentation states that by default lto uses 1 job, it can be optionally overridden with n number of jobs to run in parallel. Pass -flto=%YJOBS% when building with GCC LTO to reduce compilation time.

Clang does not support this and instead uses thin lto for concurrency. Split LTO flags for GCC and Clang into different variables.

Signed-off-by: Joey Riches josephriches@gmail.com

JoshStrobl commented 3 years ago

LGTM, thanks!