[clang] [WebAssembly] Clang support for exception-based lookup paths (PR #185775)

Sam Clegg via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 10 16:51:46 PDT 2026


================
@@ -34,6 +34,15 @@ std::string WebAssembly::getMultiarchTriple(const Driver &D,
             TargetTriple.getOSAndEnvironmentName()).str();
 }
 
+/// Returns a directory name in which separate objects compile with/without
+/// exceptions may lie. This is used both for `#include` paths as well as lib
+/// paths.
+static std::string GetCXXExceptionsDir(const ArgList &DriverArgs) {
+  if (DriverArgs.getLastArg(options::OPT_fwasm_exceptions))
+    return "eh";
+  return "noeh";
----------------
sbc100 wrote:

I wonder if we need both of there?

Isn't it enough perhaps to have the default libs be either `eh` or `noeh`?     i.e. maybe in the default case we don't need an extra directory at all?

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


More information about the cfe-commits mailing list