From 8a90261287d7464d0c6d0d2231b41a0a9e78a3fa Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 27 Jan 2026 08:06:24 +0100 Subject: Make use of exceptions explicit in compiler flags. --- src/tools.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/tools.cc') 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 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: -- cgit v1.2.3