summaryrefslogtreecommitdiffstats
path: root/platform/windows/detect.py
diff options
context:
space:
mode:
authorGeorge Marques <george@gmarqu.es>2017-12-16 22:29:02 -0200
committerGeorge Marques <george@gmarqu.es>2017-12-16 22:29:02 -0200
commitf1683a290b7261e9bb099aa8f4548809218b31b7 (patch)
treef3ebb736319da9c6c3ec33d68cf618c869e153aa /platform/windows/detect.py
parent83291eab3ae8940cc9da159774a1da6575196c89 (diff)
downloadredot-engine-f1683a290b7261e9bb099aa8f4548809218b31b7.tar.gz
Add support for whole program optimization on MSVC
Since it's similar to LTO, it can be enabled by setting use_lto=yes.
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r--platform/windows/detect.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index 01eb50e69c..564359d743 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -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'])