diff options
-rw-r--r-- | backend/ninja/Ninja.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 8c6f1b1..c602d10 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -1030,9 +1030,11 @@ namespace backend { compileCCommand.insert(compileCCommand.end(), { ninja::NinjaArg("-Wall"), - ninja::NinjaArg("-Wextra"), - ninja::NinjaArg("-Werror=return-type") + ninja::NinjaArg("-Wextra") }); + + if(!config.errorOnWarning) + compileCCommand.push_back(ninja::NinjaArg("-Werror=return-type")); } else { |