aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index d2465b4..54b86d1 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -396,9 +396,10 @@ namespace backend
}
case OPT_LEV_RELEASE:
{
- std::vector<ninja::NinjaArg> result = { ninja::NinjaArg::createRaw("-O3 -g0 -DNDEBUG") };
+ std::vector<ninja::NinjaArg> result = { ninja::NinjaArg::createRaw("-O3 -DNDEBUG") };
if(config.use_lto)
result.push_back(ninja::NinjaArg::createRaw("-flto"));
+ result.push_back(ninja::NinjaArg::createRaw(config.include_debug_symbols_in_release ? "-g3" : "-g0"));
return result;
}
}
@@ -1125,10 +1126,9 @@ namespace backend
if(config.getOptimizationLevel() == sibs::OPT_LEV_RELEASE)
{
// TODO: Specify a way to change these options, either in project.conf or argument to sibs build
- commonZigArgs.insert(commonZigArgs.end(), {
- ninja::NinjaArg::createRaw("--release-safe"),
- ninja::NinjaArg::createRaw("--strip")
- });
+ commonZigArgs.push_back(ninja::NinjaArg::createRaw("--release-safe"));
+ if(!config.include_debug_symbols_in_release)
+ commonZigArgs.push_back(ninja::NinjaArg::createRaw("--strip"));
}
zigTestArgs.insert(zigTestArgs.end(), commonZigArgs.begin(), commonZigArgs.end());
@@ -1356,7 +1356,8 @@ namespace backend
else if(config.getOptimizationLevel() == OPT_LEV_RELEASE)
{
// Strip binary
- buildExeArgs.push_back(ninja::NinjaArg::createRaw("-s"));
+ if(!config.include_debug_symbols_in_release)
+ buildExeArgs.push_back(ninja::NinjaArg::createRaw("-s"));
}
if(config.use_lto)