Browse Source

SCons: Disable misbehaving MSVC incremental linking

Fixes #77968.

(cherry picked from commit bc1aef88eef7bb09d1c537bf150414c50abfa374)
Rémi Verschelde 2 năm trước cách đây
mục cha
commit
10af8ad8d8
1 tập tin đã thay đổi với 3 bổ sung0 xóa
  1. 3 0
      platform/windows/detect.py

+ 3 - 0
platform/windows/detect.py

@@ -216,6 +216,9 @@ def configure_msvc(env, manual_msvc_config):
     else:
         env.AppendUnique(CCFLAGS=["/MD"])
 
+    # MSVC incremental linking is broken and _increases_ link time (GH-77968).
+    env.Append(LINKFLAGS=["/INCREMENTAL:NO"])
+
     env.AppendUnique(CCFLAGS=["/Gd", "/GR", "/nologo"])
     env.AppendUnique(CCFLAGS=["/utf-8"])  # Force to use Unicode encoding.
     env.AppendUnique(CXXFLAGS=["/TP"])  # assume all sources are C++