Improve LTO build with MSVC

This commit is contained in:
George Marques 2017-12-31 14:35:38 -02:00
parent 548bd4ef1d
commit abf416f922
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -190,7 +190,11 @@ def configure(env):
if (env["use_lto"]):
env.Append(CCFLAGS=['/GL'])
env.Append(LINKFLAGS=['/LTCG'])
env.Append(ARFLAGS=['/LTCG'])
if env["progress"]:
env.Append(LINKFLAGS=['/LTCG:STATUS'])
else:
env.Append(LINKFLAGS=['/LTCG'])
env.Append(CCFLAGS=["/I" + p for p in os.getenv("INCLUDE").split(";")])
env.Append(LIBPATH=[p for p in os.getenv("LIB").split(";")])