From 39ff3b199a13384bcd9383c45b1ebb2c435e607a Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Sun, 6 Oct 2019 06:58:45 +0300 Subject: [PATCH] wscript: fix LTO check scope --- wscript | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/wscript b/wscript index de079905..cc2e2dd7 100644 --- a/wscript +++ b/wscript @@ -225,14 +225,13 @@ def configure(conf): conf.env.append_unique('CFLAGS', cflags + conf.filter_cflags(compiler_optional_flags + c_compiler_optional_flags, cflags, False)) conf.env.append_unique('CXXFLAGS', cflags + conf.filter_cflags(compiler_optional_flags, cflags, True)) - if conf.options.LTO: - if conf.env.COMPILER_CC == 'gcc' or conf.env.COMPILER_CC == 'clang': - conf.env.append_unique('CFLAGS', '-flto') - conf.env.append_unique('LINKFLAGS', '-flto') - elif conf.env.COMPILER_CC == 'msvc': - conf.env.append_unique('CFLAGS', '/GL') - conf.env.append_unique('LINKFLAGS', '/LTCG') - + if conf.options.LTO: + if conf.env.COMPILER_CC == 'gcc' or conf.env.COMPILER_CC == 'clang': + conf.env.append_unique('CFLAGS', '-flto') + conf.env.append_unique('LINKFLAGS', '-flto') + elif conf.env.COMPILER_CC == 'msvc': + conf.env.append_unique('CFLAGS', '/GL') + conf.env.append_unique('LINKFLAGS', '/LTCG') conf.env.DEDICATED = conf.options.DEDICATED # we don't need game launcher on dedicated