Skip to content

Commit fa57282

Browse files
committed
SCons: Don't activate fast_unsafe automatically on dev_build
We experienced first hand why it's called unsafe, and so we should leave it as an explicit choice for contributors, informing themselves of the caveats. See godotengine#111408.
1 parent 4ad11b6 commit fa57282

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

SConstruct

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ opts.Add(
210210
)
211211
)
212212
opts.Add(BoolVariable("tests", "Build the unit tests", False))
213-
opts.Add(BoolVariable("fast_unsafe", "Enable unsafe options for faster rebuilds", False))
213+
opts.Add(BoolVariable("fast_unsafe", "Enable unsafe options for faster incremental builds", False))
214214
opts.Add(BoolVariable("ninja", "Use the ninja backend for faster rebuilds", False))
215215
opts.Add(BoolVariable("ninja_auto_run", "Run ninja automatically after generating the ninja file", True))
216216
opts.Add("ninja_file", "Path to the generated ninja file", "build.ninja")
@@ -520,10 +520,10 @@ env.Decider("MD5-timestamp")
520520

521521
# SCons speed optimization controlled by the `fast_unsafe` option, which provide
522522
# more than 10 s speed up for incremental rebuilds.
523-
# Unsafe as they reduce the certainty of rebuilding all changed files, so it's
524-
# enabled by default for `debug` builds, and can be overridden from command line.
523+
# Unsafe as they reduce the certainty of rebuilding all changed files.
524+
# If you use it and run into corrupted incremental builds, try to turn it off.
525525
# Ref: https://github.com/SCons/scons/wiki/GoFastButton
526-
if methods.get_cmdline_bool("fast_unsafe", env.dev_build):
526+
if env["fast_unsafe"]:
527527
env.SetOption("implicit_cache", 1)
528528
env.SetOption("max_drift", 60)
529529

0 commit comments

Comments
 (0)