Skip to content
This repository has been archived by the owner on Mar 28, 2020. It is now read-only.

Commit

Permalink
WebAssembly: default to disabling exceptions on WebAssembly
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuowei committed Jun 8, 2019
1 parent 09e6e53 commit a99d229
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,9 @@ static void addExceptionArgs(const ArgList &Args, types::ID InputType,
// Disable C++ EH by default on XCore and PS4.
bool CXXExceptionsEnabled =
Triple.getArch() != llvm::Triple::xcore && !Triple.isPS4CPU();
// WebAssembly: no exception handling on WASI
if (Triple.isOSBinFormatWasm())
CXXExceptionsEnabled = false;
Arg *ExceptionArg = Args.getLastArg(
options::OPT_fcxx_exceptions, options::OPT_fno_cxx_exceptions,
options::OPT_fexceptions, options::OPT_fno_exceptions);
Expand Down

0 comments on commit a99d229

Please sign in to comment.