summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-04-22 12:53:13 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-04-22 12:53:13 +0200
commit462b894840fcd1254a5d8011d6aff1f7126f33ca (patch)
tree8bcd94f59ea2a90e23f5c67ce1d2a9b69b8b8542
parent9498753cc46e7af1d985ff04daf5aa166116a416 (diff)
parent5a87f0da215efb7f696e322391762411283103ff (diff)
downloadredot-engine-462b894840fcd1254a5d8011d6aff1f7126f33ca.tar.gz
Merge pull request #90857 from Repiteo/scons/cleanup-opts
SCons: Utilize native Variable alias functionality
-rw-r--r--SConstruct11
1 files changed, 3 insertions, 8 deletions
diff --git a/SConstruct b/SConstruct
index dbcd9dfd68..260e6bb48a 100644
--- a/SConstruct
+++ b/SConstruct
@@ -168,8 +168,7 @@ if profile:
opts = Variables(customs, ARGUMENTS)
# Target build options
-opts.Add("platform", "Target platform (%s)" % ("|".join(platform_list),), "")
-opts.Add("p", "Platform (alias for 'platform')", "")
+opts.Add(["platform", "p"], "Target platform (%s)" % "|".join(platform_list), "")
opts.Add(EnumVariable("target", "Compilation target", "editor", ("editor", "template_release", "template_debug")))
opts.Add(EnumVariable("arch", "CPU architecture", "auto", ["auto"] + architectures, architecture_aliases))
opts.Add(BoolVariable("dev_build", "Developer build with dev-only debugging code (DEV_ENABLED)", False))
@@ -285,13 +284,9 @@ if env["import_env_vars"]:
# Platform selection: validate input, and add options.
-selected_platform = ""
+selected_platform = env["platform"]
-if env["platform"] != "":
- selected_platform = env["platform"]
-elif env["p"] != "":
- selected_platform = env["p"]
-else:
+if selected_platform == "":
# Missing `platform` argument, try to detect platform automatically
if (
sys.platform.startswith("linux")