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

Unified Diff: tests/toolchain/nacl.scons

Issue 639113003: Add nacl-clang testing to SCons (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 6 years, 2 months 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
Index: tests/toolchain/nacl.scons
diff --git a/tests/toolchain/nacl.scons b/tests/toolchain/nacl.scons
index 97dcc9fbddff973832ee684e0f6fe73b5ce127b4..00664dc4e229caac4b3cd23de55f053a5aa154a1 100644
--- a/tests/toolchain/nacl.scons
+++ b/tests/toolchain/nacl.scons
@@ -26,7 +26,10 @@ if env.Bit('bitcode'):
env.Append(CCFLAGS=['-allow-asm'])
# Test C++11 code with both supported C++ standard libraries.
-cpp11_libs = ['libstdc++', 'libc++']
+cpp11_libs = ['libc++']
+if env.Bit('bitcode'):
+ # PNaCl still supports libstdc++ but nacl-clang does not.
+ cpp11_libs.append('libstdc++')
cpp11_envs = {}
for lib in cpp11_libs:
cpp11_envs[lib] = env.Clone()
@@ -86,7 +89,7 @@ AddIntrinsicTest(env, 'synchronization_sync.c', '0',
not env.Bit('bitcode')) or
env.IsRunningUnderValgrind()))
AddIntrinsicTest(env, 'synchronization_volatile.c', '0')
-if env.Bit('bitcode'):
+if env.Bit('bitcode') or env.Bit('nacl_clang'):
# The following tests were only made to work on LLVM for
# PNaCl. Command-line flags and libraries need to be updated for GCC
# support.
@@ -109,7 +112,7 @@ if env.Bit('bitcode'):
# This test redirects C function calls to llvm instrinsic functions,
# so they only work w/ PNaCl.
-if env.Bit('bitcode'):
+if env.Bit('bitcode') or env.Bit('nacl_clang'):
AddIntrinsicTest(env, 'llvm_bitmanip_intrinsics.c', '0',
golden_file=env.File('llvm_bitmanip_intrinsics.stdout'))
AddIntrinsicTest(env, 'llvm_math_intrinsics.c', '0',
@@ -248,6 +251,7 @@ 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:

Powered by Google App Engine
This is Rietveld 408576698