mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 12:12:28 +00:00
Reduce gcc lto build time by telling the linker to
use the number of jobs indicated by -j
This commit is contained in:
parent
ccb4a6acee
commit
ec644ccb69
@ -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 New Issue
Block a user