From 9753fe7aec452a3ba172ea9df5480d7bc44b7d32 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sat, 23 May 2020 02:12:01 +0200 Subject: [PATCH] Print a notice when compiling with `target=debug` Debug builds are considerably slower than release builds or even release_debug builds. `target=debug` is still the default SCons target option, so unsuspecting users may be compiling unoptimized debug builds for their personal use. --- SConstruct | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index bb4b2a72ee..31303c3a5e 100644 --- a/SConstruct +++ b/SConstruct @@ -503,7 +503,6 @@ if selected_platform in platform_list: Exit(255) suffix += ".opt" env.Append(CPPDEFINES=["NDEBUG"]) - elif env["target"] == "release_debug": if env["tools"]: suffix += ".opt.tools" @@ -511,8 +510,14 @@ if selected_platform in platform_list: suffix += ".opt.debug" else: if env["tools"]: + print( + "Note: Building a debug binary (which will run slowly). Use `target=release_debug` to build an optimized release binary." + ) suffix += ".tools" else: + print( + "Note: Building a debug binary (which will run slowly). Use `target=release` to build an optimized release binary." + ) suffix += ".debug" if env["arch"] != "":