OLD | NEW |
---|---|
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 Import('env') | 6 Import('env') |
7 | 7 |
8 if not env.AllowInlineAssembly(): | 8 # yay |
9 if not env.AllowNonStableBitcode(): | |
Junichi Uekawa
2014/09/05 08:37:18
Now this goes a bit further.
/ssd/nacl2/native_cl
| |
9 Return() | 10 Return() |
10 | 11 |
12 # if not env.AllowInlineAssembly(): | |
13 # Return() | |
14 if env.Bit('nonsfi_nacl'): | |
15 # Specifying the target arch is necessary for using inline assembly in pNaCl. | |
16 if env.Bit('target_x86_32'): | |
17 env.Append(CCFLAGS=['--target=i686-unknown-nacl', | |
18 '--pnacl-allow-translate']) | |
19 elif env.Bit('target_arm'): | |
20 env.Append(CCFLAGS=['--target=arm-unknown-nacl', '-mfloat-abi=hard']) | |
21 else: | |
22 raise Exception('Unsupported architecture') | |
23 # env.SetBits('nonstable_bitcode') | |
24 env.Append(LINKFLAGS=['--pnacl-disable-abi-check']) | |
25 | |
11 test_args = {'sel_ldr_flags': ['-e', '-E', 'OUTSIDE_BROWSER=1'], | 26 test_args = {'sel_ldr_flags': ['-e', '-E', 'OUTSIDE_BROWSER=1'], |
12 'declares_exit_status': True} | 27 'declares_exit_status': True} |
13 if env.Bit('target_arm') and env.UsingEmulator(): | 28 if env.Bit('target_arm') and env.UsingEmulator(): |
14 test_args['sel_ldr_flags'].extend(['-E', 'UNDER_QEMU_ARM=1']) | 29 test_args['sel_ldr_flags'].extend(['-E', 'UNDER_QEMU_ARM=1']) |
15 | 30 |
16 helper_files = [] | 31 helper_files = [] |
17 if env.Bit('target_x86'): | 32 if env.Bit('target_x86') and not env.Bit('nonsfi_nacl'): |
33 # TODO(uekawa): enable this for NonSFI NaCl. | |
18 helper_files.append('direction_flag_x86.S') | 34 helper_files.append('direction_flag_x86.S') |
19 exception_test = env.ComponentProgram( | 35 exception_test = env.ComponentProgram( |
20 env.ProgramNameForNmf('exception_test'), | 36 env.ProgramNameForNmf('exception_test'), |
21 ['exception_test.c'] + helper_files, | 37 ['exception_test.c'] + helper_files, |
22 EXTRA_LIBS=['${NONIRT_LIBS}', '${PTHREAD_LIBS}', '${TESTRUNNER_LIBS}', | 38 EXTRA_LIBS=['${NONIRT_LIBS}', '${PTHREAD_LIBS}', '${TESTRUNNER_LIBS}', |
23 '${EXCEPTION_LIBS}', 'test_common']) | 39 '${EXCEPTION_LIBS}', 'test_common']) |
24 | 40 |
25 node = env.CommandSelLdrTestNacl( | 41 node = env.CommandSelLdrTestNacl( |
26 'exception_test.out', exception_test, **test_args) | 42 'exception_test.out', exception_test, **test_args) |
27 env.AddNodeToTestSuite( | 43 env.AddNodeToTestSuite( |
(...skipping 25 matching lines...) Expand all Loading... | |
53 'exceptions_disabled_test', | 69 'exceptions_disabled_test', |
54 ['exceptions_disabled_test.c'], | 70 ['exceptions_disabled_test.c'], |
55 EXTRA_LIBS=['${NONIRT_LIBS}', '${EXCEPTION_LIBS}']) | 71 EXTRA_LIBS=['${NONIRT_LIBS}', '${EXCEPTION_LIBS}']) |
56 node = env.CommandSelLdrTestNacl( | 72 node = env.CommandSelLdrTestNacl( |
57 'exceptions_disabled_test.out', | 73 'exceptions_disabled_test.out', |
58 exceptions_disabled_test, [], | 74 exceptions_disabled_test, [], |
59 declares_exit_status=True) | 75 declares_exit_status=True) |
60 env.AddNodeToTestSuite( | 76 env.AddNodeToTestSuite( |
61 node, ['small_tests', 'exception_tests'], | 77 node, ['small_tests', 'exception_tests'], |
62 'run_exceptions_disabled_test') | 78 'run_exceptions_disabled_test') |
OLD | NEW |