summaryrefslogtreecommitdiffstats
path: root/SConstruct
diff options
context:
space:
mode:
authorSpartan322 <Megacake1234@gmail.com>2024-11-26 12:56:19 -0500
committerSpartan322 <Megacake1234@gmail.com>2024-11-26 12:56:19 -0500
commite58e18261ea7ed3978146ef8d77a900be2601be3 (patch)
tree79c2a4c34f2d888ff962d76edf474c518d1abdea /SConstruct
parentc5b1645e60a59c0292c04bece3fdb0715a61afea (diff)
parentd09d82d433b03bb3773fd2a8cc8d6ccc2f8739ce (diff)
downloadredot-engine-e58e18261ea7ed3978146ef8d77a900be2601be3.tar.gz
Merge commit godotengine/godot@d09d82d433b03bb3773fd2a8cc8d6ccc2f8739ce
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct19
1 files changed, 7 insertions, 12 deletions
diff --git a/SConstruct b/SConstruct
index a4a43e7f8b..d6131bc7d5 100644
--- a/SConstruct
+++ b/SConstruct
@@ -227,7 +227,6 @@ opts.Add(BoolVariable("use_volk", "Use the volk library to load the Vulkan loade
opts.Add(BoolVariable("disable_exceptions", "Force disabling exception handling code", True))
opts.Add("custom_modules", "A list of comma-separated directory paths containing custom modules to build.", "")
opts.Add(BoolVariable("custom_modules_recursive", "Detect custom modules recursively for each specified path.", True))
-opts.Add(BoolVariable("swappy", "Use Swappy Frame Pacing Library in Android builds.", False))
# Advanced options
opts.Add(
@@ -383,8 +382,7 @@ if env["platform"] not in platform_list:
# Add platform-specific options.
if env["platform"] in platform_opts:
- for opt in platform_opts[env["platform"]]:
- opts.Add(opt)
+ opts.AddVariables(*platform_opts[env["platform"]])
# Platform-specific flags.
# These can sometimes override default options, so they need to be processed
@@ -440,12 +438,11 @@ for name, path in modules_detected.items():
else:
enabled = False
- opts.Add(BoolVariable("module_" + name + "_enabled", "Enable module '%s'" % (name,), enabled))
+ opts.Add(BoolVariable(f"module_{name}_enabled", f"Enable module '{name}'", enabled))
# Add module-specific options.
try:
- for opt in config.get_opts(env["platform"]):
- opts.Add(opt)
+ opts.AddVariables(*config.get_opts(env["platform"]))
except AttributeError:
pass
@@ -580,7 +577,7 @@ env.Append(RCFLAGS=env.get("rcflags", "").split())
# Feature build profile
env.disabled_classes = []
if env["build_profile"] != "":
- print('Using feature build profile: "{}"'.format(env["build_profile"]))
+ print(f'Using feature build profile: "{env["build_profile"]}"')
import json
try:
@@ -592,7 +589,7 @@ if env["build_profile"] != "":
for c in dbo:
env[c] = dbo[c]
except json.JSONDecodeError:
- print_error('Failed to open feature build profile: "{}"'.format(env["build_profile"]))
+ print_error(f'Failed to open feature build profile: "{env["build_profile"]}"')
Exit(255)
# 'dev_mode' and 'production' are aliases to set default options if they haven't been
@@ -854,8 +851,6 @@ else: # GCC, Clang
if methods.using_gcc(env):
common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]
- if cc_version_major == 7: # Bogus warning fixed in 8+.
- common_warnings += ["-Wno-strict-overflow"]
if cc_version_major < 11:
# Regression in GCC 9/10, spams so much in our variadic templates
# that we need to outright disable it.
@@ -931,7 +926,7 @@ env.module_icons_paths = []
env.doc_class_path = platform_doc_class_path
for name, path in modules_detected.items():
- if not env["module_" + name + "_enabled"]:
+ if not env[f"module_{name}_enabled"]:
continue
sys.path.insert(0, path)
env.current_module = name
@@ -1044,7 +1039,7 @@ if env["compiledb"]:
if env["ninja"]:
if env.scons_version < (4, 2, 0):
- print_error("The `ninja=yes` option requires SCons 4.2 or later, but your version is %s." % scons_raw_version)
+ print_error(f"The `ninja=yes` option requires SCons 4.2 or later, but your version is {scons_raw_version}.")
Exit(255)
SetOption("experimental", "ninja")