diff options
| author | Bent Bisballe Nyeng <deva@aasimon.org> | 2026-01-27 08:06:24 +0100 |
|---|---|---|
| committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2026-01-27 08:06:24 +0100 |
| commit | 8a90261287d7464d0c6d0d2231b41a0a9e78a3fa (patch) | |
| tree | 063dd0e152012eb5f4051ae9ece46433f30fe070 /src | |
| parent | 87d0af5e97f9d6208107cc4f5b1589430b4cd9db (diff) | |
Make use of exceptions explicit in compiler flags.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ctor.h | 1 | ||||
| -rw-r--r-- | src/tools.cc | 8 |
2 files changed, 9 insertions, 0 deletions
@@ -127,6 +127,7 @@ enum class cxx_opt warn_shadow, // -Wshadow warn_extra, // -Wextra warnings_as_errors, // -Werror + exceptions, // -fexceptions generate_dep_tree, // -MMD no_link, // -c include_path, // -I<arg> 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: |
