summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ctor.h1
-rw-r--r--src/tools.cc8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/ctor.h b/src/ctor.h
index dddc5ef..8b86aec 100644
--- a/src/ctor.h
+++ b/src/ctor.h
@@ -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: