SCons: Disable misbehaving MSVC incremental linking

Fixes #77968.

(cherry picked from commit bc1aef88ee)
This commit is contained in:
Rémi Verschelde 2023-08-10 14:04:09 +02:00
parent d0d2680245
commit b92b3911f7
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -214,6 +214,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++