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 # Do not run these tests with pexes, assuming they are portable, since | 8 # Do not run these tests with pexes, assuming they are portable, since |
9 # they use inline assembler. | 9 # they use inline assembler. |
10 if env.Bit('bitcode') and env.Bit('pnacl_generate_pexe'): | 10 if env.Bit('bitcode') and env.Bit('pnacl_generate_pexe'): |
11 Return() | 11 Return() |
12 | 12 |
13 # env's BUILD_ARCH, BUILD_SUBARCH controls what assembly files to use. | 13 # env's BUILD_ARCH, BUILD_SUBARCH controls what assembly files to use. |
14 def GetAssemblerFile(env): | 14 def GetAssemblerFile(env): |
15 if env.Bit('build_x86_32'): | 15 if env.Bit('build_x86_32'): |
16 return 'sandboxed_x86_32.S' | 16 return 'sandboxed_x86_32.S' |
17 elif env.Bit('build_x86_64'): | 17 elif env.Bit('build_x86_64'): |
18 return 'sandboxed_x86_64.S' | 18 return 'sandboxed_x86_64.S' |
19 elif env.Bit('build_arm'): | 19 elif env.Bit('build_arm'): |
20 return 'sandboxed_arm.S' | 20 return 'sandboxed_arm.S' |
| 21 elif env.Bit('build_mips32'): |
| 22 return 'sandboxed_mips.S' |
21 else: | 23 else: |
22 raise Exception('unknown architecture') | 24 raise Exception('unknown architecture') |
23 | 25 |
24 asm_env = env.Clone() | 26 asm_env = env.Clone() |
25 use_obj_env = env.Clone() | 27 use_obj_env = env.Clone() |
26 | 28 |
27 if asm_env.Bit('bitcode'): | 29 if asm_env.Bit('bitcode'): |
28 asm_env.PNaClForceNative() | 30 asm_env.PNaClForceNative() |
29 # Allow use of native object file | 31 # Allow use of native object file |
30 use_obj_env.Append(LINKFLAGS=['--pnacl-allow-native']) | 32 use_obj_env.Append(LINKFLAGS=['--pnacl-allow-native']) |
(...skipping 13 matching lines...) Expand all Loading... |
44 | 46 |
45 thread_create_bad_address_nexe = env.ComponentProgram( | 47 thread_create_bad_address_nexe = env.ComponentProgram( |
46 'thread_create_bad_address', | 48 'thread_create_bad_address', |
47 env.RawSyscallObjects(['thread_create_bad_address.c']), | 49 env.RawSyscallObjects(['thread_create_bad_address.c']), |
48 EXTRA_LIBS=['${NONIRT_LIBS}']) | 50 EXTRA_LIBS=['${NONIRT_LIBS}']) |
49 node = env.CommandSelLdrTestNacl( | 51 node = env.CommandSelLdrTestNacl( |
50 'thread_create_bad_address.out', | 52 'thread_create_bad_address.out', |
51 thread_create_bad_address_nexe) | 53 thread_create_bad_address_nexe) |
52 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'], | 54 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'], |
53 'run_thread_create_bad_address_test') | 55 'run_thread_create_bad_address_test') |
OLD | NEW |