Browse Source

SCons: Disable misbehaving MSVC incremental linking

Fixes #77968.

(cherry picked from commit bc1aef88eef7bb09d1c537bf150414c50abfa374)
Rémi Verschelde 2 years ago
parent
commit
32b7664371
1 changed files with 3 additions and 0 deletions
  1. 3 0
      platform/windows/detect.py

+ 3 - 0
platform/windows/detect.py

@@ -355,6 +355,9 @@ def configure_msvc(env, vcvars_msvc_config):
         else:
         else:
             env.AppendUnique(CCFLAGS=["/MD"])
             env.AppendUnique(CCFLAGS=["/MD"])
 
 
+    # MSVC incremental linking is broken and _increases_ link time (GH-77968).
+    env.Append(LINKFLAGS=["/INCREMENTAL:NO"])
+
     if env["arch"] == "x86_32":
     if env["arch"] == "x86_32":
         env["x86_libtheora_opt_vc"] = True
         env["x86_libtheora_opt_vc"] = True