aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-07-07 22:25:52 +0200
committerdec05eba <dec05eba@protonmail.com>2021-08-20 17:09:42 +0200
commitd580d6cd7d3ff24b820d9ea383cb9e766f4416f4 (patch)
tree097f2864e1069836d4168d06bb91428e73d8c2db /backend
parent61d9e8699687342c2e32c32c8d4eb71760d5d290 (diff)
More protections under debug builds
Diffstat (limited to 'backend')
-rw-r--r--backend/ninja/Ninja.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index be78ba1..d2465b4 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -383,13 +383,12 @@ namespace backend
{
case OPT_LEV_DEBUG:
{
- // TODO: Add _GLIBCXX_DEBUG
std::vector<ninja::NinjaArg> result = {
ninja::NinjaArg::createRaw("-O0 -g3"),
- ninja::NinjaArg::createRaw("-D_GLIBCXX_ASSERTIONS"),
+ ninja::NinjaArg::createRaw("-D_GLIBCXX_ASSERTIONS -Wformat -Werror=format-security"),
ninja::NinjaArg::createRaw("-fasynchronous-unwind-tables"),
- ninja::NinjaArg::createRaw("-D_DEBUG"),
- ninja::NinjaArg::createRaw("-fno-omit-frame-pointer"),
+ ninja::NinjaArg::createRaw("-D_DEBUG -D_GLIBCXX_DEBUG"),
+ ninja::NinjaArg::createRaw("-fno-omit-frame-pointer -fstack-clash-protection -fcf-protection"),
};
if(config.use_lto)
result.push_back(ninja::NinjaArg::createRaw("-flto"));