SCons: Convert platform get_flags to dictionary
This commit is contained in:
@ -122,6 +122,8 @@ for x in sorted(glob.glob("platform/*")):
|
||||
platform_list += [x]
|
||||
platform_opts[x] = detect.get_opts()
|
||||
platform_flags[x] = detect.get_flags()
|
||||
if isinstance(platform_flags[x], list): # backwards compatibility
|
||||
platform_flags[x] = {flag[0]: flag[1] for flag in platform_flags[x]}
|
||||
sys.path.remove(tmppath)
|
||||
sys.modules.pop("detect")
|
||||
|
||||
@ -569,9 +571,9 @@ if env["build_profile"] != "":
|
||||
# Platform specific flags.
|
||||
# These can sometimes override default options.
|
||||
flag_list = platform_flags[env["platform"]]
|
||||
for f in flag_list:
|
||||
if f[0] not in ARGUMENTS or ARGUMENTS[f[0]] == "auto": # Allow command line to override platform flags
|
||||
env[f[0]] = f[1]
|
||||
for key, value in flag_list.items():
|
||||
if key not in ARGUMENTS or ARGUMENTS[key] == "auto": # Allow command line to override platform flags
|
||||
env[key] = value
|
||||
|
||||
# 'dev_mode' and 'production' are aliases to set default options if they haven't been
|
||||
# set manually by the user.
|
||||
|
||||
Reference in New Issue
Block a user