Add support for whole program optimization on MSVC

Since it's similar to LTO, it can be enabled by setting use_lto=yes.
This commit is contained in:
George Marques 2017-12-16 22:29:02 -02:00
parent 83291eab3a
commit f1683a290b
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D

View file

@ -188,6 +188,9 @@ def configure(env):
else:
VC_PATH = ""
if (env["use_lto"]):
env.Append(CCFLAGS=['/GL'])
env.Append(LINKFLAGS=['/LTCG'])
if (env["openmp"]):
env.Append(CPPFLAGS=['/openmp'])