Chromium Code Reviews| 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 # Use of "-nostdlib" means these tests produce statically-linked | 8 # Use of "-nostdlib" means these tests produce statically-linked |
| 9 # executables. This does not work with the test runner for | 9 # executables. This does not work with the test runner for |
| 10 # nacl-glibc, which always runs the executables via ld.so. However, | 10 # nacl-glibc, which always runs the executables via ld.so. However, |
| 11 # we want to keep building the tests. | 11 # we want to keep building the tests. |
| 12 # TODO(mseaborn): To fix this, either switch these tests to | 12 # TODO(mseaborn): To fix this, either switch these tests to |
| 13 # dynamically link against libc, or make use of ld.so optional. | 13 # dynamically link against libc, or make use of ld.so optional. |
| 14 is_glibc = env.Bit('nacl_glibc') | 14 is_glibc = env.Bit('nacl_glibc') |
| 15 | 15 |
| 16 env.Replace(LIBS=[], | 16 env.Replace(LIBS=[], |
| 17 EXTRA_LIBS=[], | 17 EXTRA_LIBS=[], |
| 18 LINKFLAGS=['-nostdlib'], | 18 LINKFLAGS=['-nostdlib'], |
| 19 TRANSLATEFLAGS=['-nostdlib']) | 19 TRANSLATEFLAGS=['-nostdlib']) |
| 20 | 20 |
| 21 # This setting will affect the barebones_regs.c test | 21 # This setting will affect the barebones_regs.c test |
| 22 if env.Bit('build_arm'): | 22 if env.Bit('build_arm'): |
| 23 env.Append(CPPDEFINES='SMALL_REGS_TEST') | 23 env.Append(CPPDEFINES='SMALL_REGS_TEST') |
| 24 | 24 |
| 25 # The barebones_reloc test need symbols preserved, since it provides | |
| 26 # a stub function for something that normally comes from the libraries. | |
|
Mark Seaborn
2013/03/28 01:31:34
What stub function does barebones_reloc provide th
jvoung - send to chromium...
2013/03/28 15:50:29
barebones_reloc.c stores to a few tls variables.
Mark Seaborn
2013/03/28 16:44:33
Do you get a link error here?
I'm not sure why st
jvoung (off chromium)
2013/03/28 17:54:50
Yes it's a link error, trying to find __nacl_read_
| |
| 27 if env.Bit('bitcode'): | |
| 28 env.SetBits('nonstable_bitcode') | |
| 29 if env.Bit('skip_nonstable_bitcode'): | |
| 30 Return() | |
| 25 | 31 |
| 26 # NOTE: the x86 linker wants _start() to be the very first function | 32 # NOTE: the x86 linker wants _start() to be the very first function |
| 27 FAKE_STARTUP = env.ComponentObject('fake_startup', 'fake_startup.c') | 33 FAKE_STARTUP = env.ComponentObject('fake_startup', 'fake_startup.c') |
| 28 | 34 |
| 29 barebones_tests = ['addr_modes', | 35 barebones_tests = ['addr_modes', |
| 30 'stack_alignment16', | 36 'stack_alignment16', |
| 31 'exit', | 37 'exit', |
| 32 'fib', | 38 'fib', |
| 33 'hello_world', | 39 'hello_world', |
| 34 'negindex', | 40 'negindex', |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 if native_env.Bit('bitcode'): | 79 if native_env.Bit('bitcode'): |
| 74 native_env.AddBiasForPNaCl() | 80 native_env.AddBiasForPNaCl() |
| 75 native_env.PNaClForceNative() | 81 native_env.PNaClForceNative() |
| 76 | 82 |
| 77 nexe = native_env.ComponentProgram('top_of_sandbox', ['top_of_sandbox.c']) | 83 nexe = native_env.ComponentProgram('top_of_sandbox', ['top_of_sandbox.c']) |
| 78 node = native_env.CommandSelLdrTestNacl('top_of_sandbox.out', nexe) | 84 node = native_env.CommandSelLdrTestNacl('top_of_sandbox.out', nexe) |
| 79 native_env.AddNodeToTestSuite( | 85 native_env.AddNodeToTestSuite( |
| 80 node, ['small_tests', 'sel_ldr_tests', 'barebones_tests'], | 86 node, ['small_tests', 'sel_ldr_tests', 'barebones_tests'], |
| 81 'run_top_of_sandbox_test', | 87 'run_top_of_sandbox_test', |
| 82 is_broken=is_glibc) | 88 is_broken=is_glibc) |
| OLD | NEW |