From 5cee41ecd4557e31755e18773b6006052f83a779 Mon Sep 17 00:00:00 2001
From: JF Bastien
PNaCl currently supports C++ exception handling through setjmp()
and
-longjmp()
, which can be enabled with the --pnacl-exceptions=sjlj
-linker flag. Exceptions are disabled by default so that faster and
-smaller code is generated, and throw
statements are replaced with
-calls to abort()
. The usual -fno-exceptions
flag is also
-supported. PNaCl will support full zero-cost exception handling in the
-future.
longjmp()
, which can be enabled with the --pnacl-exceptions=sjlj
linker
+flag (set with LDFLAGS
when using Make). Exceptions are disabled by default
+so that faster and smaller code is generated, and throw
statements are
+replaced with calls to abort()
. The usual -fno-exceptions
flag is also
+supported, though the default is -fexceptions
. PNaCl will support full
+zero-cost exception handling in the future.
+
NaCl supports full zero-cost C++ exception handling.
Inline assembly isn’t supported by PNaCl because it isn’t portable. The diff --git a/native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst b/native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst index 2324774..1a87dff 100644 --- a/native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst +++ b/native_client_sdk/src/doc/reference/pnacl-c-cpp-language-support.rst @@ -176,12 +176,19 @@ C++ Exception Handling ====================== PNaCl currently supports C++ exception handling through ``setjmp()`` and -``longjmp()``, which can be enabled with the ``--pnacl-exceptions=sjlj`` -linker flag. Exceptions are disabled by default so that faster and -smaller code is generated, and ``throw`` statements are replaced with -calls to ``abort()``. The usual ``-fno-exceptions`` flag is also -supported. PNaCl will support full zero-cost exception handling in the -future. +``longjmp()``, which can be enabled with the ``--pnacl-exceptions=sjlj`` linker +flag (set with ``LDFLAGS`` when using Make). Exceptions are disabled by default +so that faster and smaller code is generated, and ``throw`` statements are +replaced with calls to ``abort()``. The usual ``-fno-exceptions`` flag is also +supported, though the default is ``-fexceptions``. PNaCl will support full +zero-cost exception handling in the future. + +.. note:: When using naclports_ or other prebuilt static libraries, you don't + need to recompile because the exception handling support is + implemented at link time (when all the static libraries are put + together with your application). + +.. _naclports: https://code.google.com/p/naclports NaCl supports full zero-cost C++ exception handling. -- cgit v1.1