Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(624)

Unified Diff: tests/toolchain/nacl.scons

Issue 97593002: Add tests for C++11's std::rethrow_exception() (dependent exceptions) (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Fix Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/toolchain/eh_throw_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/toolchain/nacl.scons
diff --git a/tests/toolchain/nacl.scons b/tests/toolchain/nacl.scons
index 32f43af1338ae18742078d2a3ffcb1e4d688d47f..d8d2ced06e09621f7f23fd5943d3bfed4e7bde3a 100644
--- a/tests/toolchain/nacl.scons
+++ b/tests/toolchain/nacl.scons
@@ -234,17 +234,25 @@ def MakeEnv(env, use_opts, use_frames):
EH_ENVIRONMENTS_TO_TRY = []
+base_eh_env = env.Clone()
+supports_cxx11 = env.Bit('bitcode') or env.Bit('target_arm')
+base_eh_env.Append(CPPDEFINES=[['SUPPORTS_CXX11', str(int(supports_cxx11))]])
+if supports_cxx11:
+ # This flag is necessary for testing std::rethrow_exception(), at
+ # least when using libstdc++.
+ base_eh_env.Append(CXXFLAGS=['-std=gnu++11'])
+
if env.Bit('bitcode') and env['TOOLCHAIN_FEATURE_VERSION'] >= 1:
- sjlj_eh_env = env.Clone()
+ sjlj_eh_env = base_eh_env.Clone()
sjlj_eh_env.Append(LINKFLAGS=['--pnacl-exceptions=sjlj'])
EH_ENVIRONMENTS_TO_TRY.append(('sjlj', sjlj_eh_env))
if env.Bit('bitcode'):
- zerocost_eh_env = env.Clone()
+ zerocost_eh_env = base_eh_env.Clone()
zerocost_eh_env.Append(LINKFLAGS=['--pnacl-allow-exceptions'])
zerocost_eh_env.Append(TRANSLATEFLAGS=['--pnacl-allow-exceptions'])
else:
- zerocost_eh_env = env
+ zerocost_eh_env = base_eh_env
# Zero-cost C++ exception handling is not currently supported in
# PNaCl's stable ABI.
if zerocost_eh_env.AllowNonStableBitcode():
« no previous file with comments | « tests/toolchain/eh_throw_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698