You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
SCons: Silence redundant msvc output
This commit is contained in:
@@ -186,6 +186,7 @@ def get_opts():
|
|||||||
BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
|
BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
|
||||||
BoolVariable("debug_crt", "Compile with MSVC's debug CRT (/MDd)", False),
|
BoolVariable("debug_crt", "Compile with MSVC's debug CRT (/MDd)", False),
|
||||||
BoolVariable("incremental_link", "Use MSVC incremental linking. May increase or decrease build times.", False),
|
BoolVariable("incremental_link", "Use MSVC incremental linking. May increase or decrease build times.", False),
|
||||||
|
BoolVariable("silence_msvc", "Silence MSVC's stdout. Decreases output log bloat by roughly half.", True),
|
||||||
("angle_libs", "Path to the ANGLE static libraries", ""),
|
("angle_libs", "Path to the ANGLE static libraries", ""),
|
||||||
# Direct3D 12 support.
|
# Direct3D 12 support.
|
||||||
("mesa_libs", "Path to the MESA/NIR static libraries (required for D3D12)", ""),
|
("mesa_libs", "Path to the MESA/NIR static libraries (required for D3D12)", ""),
|
||||||
@@ -358,6 +359,20 @@ def configure_msvc(env, vcvars_msvc_config):
|
|||||||
|
|
||||||
## Compile/link flags
|
## Compile/link flags
|
||||||
|
|
||||||
|
env["MAXLINELENGTH"] = 8192 # Windows Vista and beyond, so always applicable.
|
||||||
|
|
||||||
|
if env["silence_msvc"]:
|
||||||
|
env.Prepend(CCFLAGS=[">", "NUL"])
|
||||||
|
env.Prepend(LINKFLAGS=[">", "NUL"])
|
||||||
|
|
||||||
|
# "> NUL" fails if using a tempfile, circumvent by removing the argument altogether.
|
||||||
|
old_esc_func = env["TEMPFILEARGESCFUNC"]
|
||||||
|
|
||||||
|
def trim_nul(arg):
|
||||||
|
return "" if arg in [">", "NUL"] else old_esc_func(arg)
|
||||||
|
|
||||||
|
env["TEMPFILEARGESCFUNC"] = trim_nul
|
||||||
|
|
||||||
if env["debug_crt"]:
|
if env["debug_crt"]:
|
||||||
# Always use dynamic runtime, static debug CRT breaks thread_local.
|
# Always use dynamic runtime, static debug CRT breaks thread_local.
|
||||||
env.AppendUnique(CCFLAGS=["/MDd"])
|
env.AppendUnique(CCFLAGS=["/MDd"])
|
||||||
|
|||||||
Reference in New Issue
Block a user