From ec644ccb69dae13c173d69cb26b9a59ae20854e3 Mon Sep 17 00:00:00 2001 From: "Felix M. Cobos" Date: Tue, 26 Sep 2017 14:22:49 +0200 Subject: Reduce gcc lto build time by telling the linker to use the number of jobs indicated by -j --- platform/x11/detect.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'platform/x11/detect.py') diff --git a/platform/x11/detect.py b/platform/x11/detect.py index c8d9930af1..1f7f67fe10 100644 --- a/platform/x11/detect.py +++ b/platform/x11/detect.py @@ -120,7 +120,10 @@ def configure(env): if env['use_lto']: env.Append(CCFLAGS=['-flto']) - env.Append(LINKFLAGS=['-flto']) + if not env['use_llvm'] and env.GetOption("num_jobs") > 1: + env.Append(LINKFLAGS=['-flto=' + str(env.GetOption("num_jobs"))]) + else: + env.Append(LINKFLAGS=['-flto']) if not env['use_llvm']: env['RANLIB'] = 'gcc-ranlib' env['AR'] = 'gcc-ar' -- cgit v1.2.3