diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-09-25 22:44:05 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-25 22:44:05 +0200 |
commit | 78aa7b382a8b1c80e0e2b01e02ff0acb2942e2e1 (patch) | |
tree | f233c01bb087310b8e3ae931287f4740135cac61 /platform/windows/detect.py | |
parent | 5195935156f942418a2ef3f1159a4bab391ba11e (diff) | |
parent | 3e69d19116e8d0d64fcbb096d925249e5d3596ed (diff) |
Merge pull request #11567 from QuLogic/scons-var-types
Add types to scons command-line options
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r-- | platform/windows/detect.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py index 053ea466f3..92f2e078c8 100644 --- a/platform/windows/detect.py +++ b/platform/windows/detect.py @@ -49,6 +49,7 @@ def can_build(): def get_opts(): + from SCons.Variables import BoolVariable, EnumVariable mingw32 = "" mingw64 = "" @@ -64,8 +65,8 @@ def get_opts(): return [ ('mingw_prefix_32', 'MinGW prefix (Win32)', mingw32), ('mingw_prefix_64', 'MinGW prefix (Win64)', mingw64), - ('use_lto', 'Use link time optimization (when using MingW)', 'no'), - ('debug_symbols', 'Add debug symbols to release version (yes/no/full)', 'yes') + BoolVariable('use_lto', 'Use link time optimization (when using MingW)', False), + EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')), ] @@ -262,7 +263,7 @@ def configure(env): env['LD'] = mingw_prefix + "g++" env["x86_libtheora_opt_gcc"] = True - if (env["use_lto"] == "yes"): + if env['use_lto']: env.Append(CCFLAGS=['-flto']) env.Append(LINKFLAGS=['-flto']) |