diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2017-09-26 17:18:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-26 17:18:40 +0200 |
commit | 7119858ce6b5e8dd045589da8387b1c1cd4c76ef (patch) | |
tree | 3432ff7c57450e3624af4170082652ed2a29b79b /platform/x11 | |
parent | 7123a81e43885aad4a50b24981492c57bf9b9320 (diff) | |
parent | ec644ccb69dae13c173d69cb26b9a59ae20854e3 (diff) |
Merge pull request #11611 from fcobos/lto_jobs
Reduce gcc lto build time by telling the linker to use the number of jobs indicated by -j
[ci skip]
Diffstat (limited to 'platform/x11')
-rw-r--r-- | platform/x11/detect.py | 5 |
1 files changed, 4 insertions, 1 deletions
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' |