summaryrefslogtreecommitdiff
path: root/src/tools.cc
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2026-01-27 08:06:24 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2026-01-27 08:06:24 +0100
commit8a90261287d7464d0c6d0d2231b41a0a9e78a3fa (patch)
tree063dd0e152012eb5f4051ae9ece46433f30fe070 /src/tools.cc
parent87d0af5e97f9d6208107cc4f5b1589430b4cd9db (diff)
Make use of exceptions explicit in compiler flags.
Diffstat (limited to 'src/tools.cc')
-rw-r--r--src/tools.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/tools.cc b/src/tools.cc
index 9dcaec6..f8662cc 100644
--- a/src/tools.cc
+++ b/src/tools.cc
@@ -51,6 +51,7 @@ std::ostream& operator<<(std::ostream& stream, const ctor::cxx_opt& opt)
case ctor::cxx_opt::warn_shadow: stream << "ctor::cxx_opt::warn_shadow"; break;
case ctor::cxx_opt::warn_extra: stream << "ctor::cxx_opt::warn_extra"; break;
case ctor::cxx_opt::warnings_as_errors: stream << "ctor::cxx_opt::warnings_as_errors"; break;
+ case ctor::cxx_opt::exceptions: stream << "ctor::cxx_opt::exceptions"; break;
case ctor::cxx_opt::generate_dep_tree: stream << "ctor::cxx_opt::generate_dep_tree"; break;
case ctor::cxx_opt::no_link: stream << "ctor::cxx_opt::no_link"; break;
case ctor::cxx_opt::include_path: stream << "ctor::cxx_opt::include_path"; break;
@@ -357,6 +358,11 @@ ctor::cxx_flag cxx_option(std::string_view flag)
return { ctor::cxx_opt::warn_extra};
}
+ if(flag.starts_with("-fexceptions"))
+ {
+ return { ctor::cxx_opt::exceptions};
+ }
+
if(flag.starts_with("-g"))
{
return { ctor::cxx_opt::debug };
@@ -420,6 +426,8 @@ std::vector<std::string> cxx_option(ctor::cxx_opt opt, std::string_view arg,
return {"-Wextra"};
case ctor::cxx_opt::warnings_as_errors:
return {"-Werror"};
+ case ctor::cxx_opt::exceptions:
+ return {"-fexceptions"};
case ctor::cxx_opt::generate_dep_tree:
return {"-MMD"};
case ctor::cxx_opt::no_link: