Use BoolVariable in platform-specific options.
This commit is contained in:
@ -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'])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user