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 if env.Bit('nonsfi_nacl'): |
9 Return() | 9 # Specifying the target arch is necessary for using inline assembly in pNaCl. |
| 10 if env.Bit('target_x86_32'): |
| 11 env.Append(CCFLAGS=['--target=i686-unknown-nacl', |
| 12 '--pnacl-allow-translate']) |
| 13 elif env.Bit('target_arm'): |
| 14 env.Append(CCFLAGS=['--target=arm-unknown-nacl', '-mfloat-abi=hard']) |
| 15 else: |
| 16 raise Exception('Unsupported architecture') |
| 17 # env.SetBits('nonstable_bitcode') |
| 18 env.Append(LINKFLAGS=['--pnacl-disable-abi-check',]) |
| 19 |
| 20 # if not env.AllowInlineAssembly(): |
| 21 # Return() |
10 | 22 |
11 env.ComponentLibrary('test_common', ['register_set.c']) | 23 env.ComponentLibrary('test_common', ['register_set.c']) |
12 | 24 |
13 # This test just checks that the utility functions in register_set.h | 25 # This test just checks that the utility functions in register_set.h |
14 # work properly. | 26 # work properly. |
15 nexe = env.ComponentProgram('register_set_test', ['register_set_test.c'], | 27 nexe = env.ComponentProgram('register_set_test', ['register_set_test.c'], |
16 EXTRA_LIBS=['test_common', '${NONIRT_LIBS}']) | 28 EXTRA_LIBS=['test_common', '${NONIRT_LIBS}']) |
17 node = env.CommandSelLdrTestNacl('register_set_test.out', nexe) | 29 node = env.CommandSelLdrTestNacl('register_set_test.out', nexe) |
18 # Valgrind does not seem to like the stack switching that this test does. | 30 # Valgrind does not seem to like the stack switching that this test does. |
19 is_broken = env.IsRunningUnderValgrind() | 31 is_broken = env.IsRunningUnderValgrind() |
20 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'], | 32 env.AddNodeToTestSuite(node, ['small_tests', 'nonpexe_tests'], |
21 'run_register_set_test', | 33 'run_register_set_test', |
22 is_broken=is_broken) | 34 is_broken=is_broken) |
OLD | NEW |