diff options
Diffstat (limited to 'SConstruct')
-rw-r--r-- | SConstruct | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/SConstruct b/SConstruct index c7b9d5bc86..6a4dea2c09 100644 --- a/SConstruct +++ b/SConstruct @@ -183,6 +183,7 @@ opts.Add(BoolVariable("separate_debug_symbols", "Extract debugging symbols to a opts.Add(EnumVariable("lto", "Link-time optimization (production builds)", "none", ("none", "auto", "thin", "full"))) opts.Add(BoolVariable("production", "Set defaults to build Godot for use in production", False)) opts.Add(BoolVariable("generate_apk", "Generate an APK/AAB after building Android library by calling Gradle", False)) +opts.Add(BoolVariable("threads", "Enable threading support", True)) # Components opts.Add(BoolVariable("deprecated", "Enable compatibility code for deprecated and removed features", True)) @@ -832,6 +833,10 @@ if selected_platform in platform_list: suffix += ".double" suffix += "." + env["arch"] + + if not env["threads"]: + suffix += ".nothreads" + suffix += env.extra_suffix sys.path.remove(tmppath) @@ -972,6 +977,9 @@ if selected_platform in platform_list: env.Tool("compilation_db") env.Alias("compiledb", env.CompilationDatabase()) + if env["threads"]: + env.Append(CPPDEFINES=["THREADS_ENABLED"]) + Export("env") # Build subdirs, the build order is dependent on link order. |