1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-15 13:51:40 +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:
Felix M. Cobos
2017-09-26 14:22:49 +02:00
parent ccb4a6acee
commit ec644ccb69
2 changed files with 8 additions and 2 deletions

View File

@@ -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