[clang] Multilib support for libraries with exceptions (PR #75031)

Volodymyr Turanskyy via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 30 09:20:45 PST 2024


================
@@ -264,6 +273,15 @@ ToolChain::getMultilibFlags(const llvm::opt::ArgList &Args) const {
     break;
   }
 
+  // Include fno-exceptions and fno-rtti
+  // to improve multilib selection
+  if (getRTTIMode() == ToolChain::RTTIMode::RM_Disabled) {
+    Result.push_back("-fno-rtti");
----------------
voltur01 wrote:

RTTI is required for exceptions support, e.g. a relevant discussion https://stackoverflow.com/questions/10320072/is-there-a-relation-between-rtti-and-exceptions

Equally, we can update the title of the PR to reflect both options.

https://github.com/llvm/llvm-project/pull/75031


More information about the cfe-commits mailing list