diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-04-22 19:32:57 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-04-22 19:32:57 +0200 |
commit | 00cd5681c3a83c85d2a34fb2c4b6cfb691ef1b3d (patch) | |
tree | 99d1e4f29ffb1d55390af71adfe04520d3e52715 /backend/ninja | |
parent | 9333730db8b0293cccee31b5b5c7045ed36fb9f9 (diff) |
rename flto option to lto
Diffstat (limited to 'backend/ninja')
-rw-r--r-- | backend/ninja/Ninja.cpp | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index ace95d9..ea3d96f 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -448,20 +448,23 @@ namespace backend case OPT_LEV_DEBUG: { // TODO: Add _GLIBCXX_DEBUG - return { + std::vector<ninja::NinjaArg> result = { ninja::NinjaArg::createRaw("-O0 -g3"), ninja::NinjaArg::createRaw("-D_GLIBCXX_ASSERTIONS"), ninja::NinjaArg::createRaw("-fasynchronous-unwind-tables"), ninja::NinjaArg::createRaw("-D_DEBUG"), ninja::NinjaArg::createRaw("-fno-omit-frame-pointer"), }; + if(config.use_lto) + result.push_back(ninja::NinjaArg::createRaw("-flto")); + return result; } case OPT_LEV_RELEASE: { - if(config.use_flto) - return { ninja::NinjaArg::createRaw("-O3 -g0 -DNDEBUG -flto") }; - else - return { ninja::NinjaArg::createRaw("-O3 -g0 -DNDEBUG") }; + std::vector<ninja::NinjaArg> result = { ninja::NinjaArg::createRaw("-O3 -g0 -DNDEBUG") }; + if(config.use_lto) + result.push_back(ninja::NinjaArg::createRaw("-flto")); + return result; } } break; @@ -1411,7 +1414,7 @@ namespace backend buildExeArgs.push_back(ninja::NinjaArg::createRaw("-s")); } - if(config.getOptimizationLevel() == OPT_LEV_RELEASE && config.use_flto) + if(config.use_lto) { buildExeArgs.push_back(ninja::NinjaArg::createRaw("-flto")); } @@ -1639,7 +1642,7 @@ namespace backend if(sanitizeFlag.type != ninja::NinjaArg::Type::NONE) buildDynamicArgs.push_back(std::move(sanitizeFlag)); - if(config.getOptimizationLevel() == OPT_LEV_RELEASE && config.use_flto) + if(config.use_lto) { buildDynamicArgs.push_back(ninja::NinjaArg::createRaw("-flto")); } |