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]
This commit is contained in:
commit
7119858ce6
2 changed files with 8 additions and 2 deletions
|
@ -265,7 +265,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'])
|
||||
|
||||
## Compile flags
|
||||
|
||||
|
|
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue