Index: SConstruct |
diff --git a/SConstruct b/SConstruct |
index ab58f1dc8d671ad7ecb68a45e5e27d196a24ff34..4372c1e16b4b74440be216b40c33020eea6bc775 100755 |
--- a/SConstruct |
+++ b/SConstruct |
@@ -684,6 +684,9 @@ nonsfi_test_whitelist = set([ |
'run_stack_alignment_test', |
'run_syscall_test', |
'run_thread_test', |
+ |
+ # TODO(uekawa): Enable exception test when implementation is ready. |
+ # 'run_exception_test', |
]) |
@@ -3004,6 +3007,23 @@ def AllowInlineAssembly(env): |
inline assembly, it returns False. Otherwise, on success, it |
returns True. |
""" |
+ if env.Bit('nonsfi_nacl'): |
+ if not AllowNonStableBitcode(env): |
+ return False |
+ # Specifying the target arch is necessary for using inline |
+ # assembly in pNaCl. |
+ if env.Bit('target_x86_32'): |
+ env.AppendUnique(CCFLAGS=['--target=i686-unknown-nacl', |
+ '--pnacl-allow-translate']) |
+ elif env.Bit('target_arm'): |
+ env.AppendUnique(CCFLAGS=['--target=arm-unknown-nacl', |
+ '-mfloat-abi=hard', |
+ '--pnacl-allow-translate']) |
+ else: |
+ return False |
+ env.AppendUnique(LINKFLAGS=['--pnacl-disable-abi-check',]) |
+ return True; |
+ |
if env.Bit('bitcode'): |
Junichi Uekawa
2014/09/09 12:23:58
I am a little bit confused by how this part is con
|
# For each architecture, we only attempt to make our inline |
# assembly code work with one untrusted-code toolchain. For x86, |