Use BoolVariable in platform-specific options.

This commit is contained in:
Elliott Sales de Andrade
2017-09-25 00:37:17 -04:00
parent 5be675eb03
commit 3e69d19116
8 changed files with 47 additions and 47 deletions

View File

@ -49,7 +49,7 @@ def can_build():
def get_opts():
from SCons.Variables import EnumVariable
from SCons.Variables import BoolVariable, EnumVariable
mingw32 = ""
mingw64 = ""
@ -65,7 +65,7 @@ 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'),
BoolVariable('use_lto', 'Use link time optimization (when using MingW)', False),
EnumVariable('debug_symbols', 'Add debug symbols to release version', 'yes', ('yes', 'no', 'full')),
]
@ -263,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'])