Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCons: Utilize native Variable alias functionality #90857

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -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")
Expand Down
Loading