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 # force inclusion of entire library, so that we can validate it | 8 # force inclusion of entire library, so that we can validate it |
9 # NOTE: This approach does not work for -lc because of tons of | 9 # NOTE: This approach does not work for -lc because of tons of |
10 # undefined symbols which would have to be stubbed out | 10 # undefined symbols which would have to be stubbed out |
(...skipping 534 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
545 'run_pic_constant_test') | 545 'run_pic_constant_test') |
546 | 546 |
547 WRAP_LINK_FLAGS = ['-Wl,--wrap=foo', '-Wl,--wrap=bar'] | 547 WRAP_LINK_FLAGS = ['-Wl,--wrap=foo', '-Wl,--wrap=bar'] |
548 env.ComponentLibrary('wrap_lib', ['wrap_lib1.c', 'wrap_lib2.c']) | 548 env.ComponentLibrary('wrap_lib', ['wrap_lib1.c', 'wrap_lib2.c']) |
549 nexe = env.ComponentProgram('wrap', ['wrap_main.c'], | 549 nexe = env.ComponentProgram('wrap', ['wrap_main.c'], |
550 EXTRA_LINKFLAGS=WRAP_LINK_FLAGS, | 550 EXTRA_LINKFLAGS=WRAP_LINK_FLAGS, |
551 EXTRA_LIBS=['wrap_lib', '${NONIRT_LIBS}']) | 551 EXTRA_LIBS=['wrap_lib', '${NONIRT_LIBS}']) |
552 node = env.CommandSelLdrTestNacl('wrap.out', nexe, | 552 node = env.CommandSelLdrTestNacl('wrap.out', nexe, |
553 stdout_golden=env.File('wrap.stdout')) | 553 stdout_golden=env.File('wrap.stdout')) |
554 env.AddNodeToTestSuite(node, ['toolchain_tests','small_tests'], 'run_wrap_test') | 554 env.AddNodeToTestSuite(node, ['toolchain_tests','small_tests'], 'run_wrap_test') |
| 555 |
| 556 if (env.Bit('target_x86_32') and env.Bit('bitcode') and |
| 557 not env.Bit('pnacl_generate_pexe') and |
| 558 env['TOOLCHAIN_FEATURE_VERSION'] >= 7): |
| 559 # This test compiles a file that will need to generate a call to a compiler-rt |
| 560 # function (__udivdi3) on x86-32. Ensure that when we pre-translate to a |
| 561 # native object file, libgcc is included in the bitcode link to satisfy the |
| 562 # reference. |
| 563 mixedlink_env = env.Clone() |
| 564 mixedlink_env.Append(CCFLAGS=['--pnacl-allow-translate', |
| 565 '--pnacl-allow-native', |
| 566 '-arch', 'x86-32']) |
| 567 mixedlink_env.Append(LINKFLAGS=['--pnacl-allow-translate', |
| 568 '--pnacl-allow-native', |
| 569 '-arch', 'x86-32']) |
| 570 nexe = mixedlink_env.ComponentProgram('libgcc_mixed_link', 'needs_libgcc.c', |
| 571 EXTRA_LIBS=['${NONIRT_LIBS}']) |
| 572 node = mixedlink_env.CommandSelLdrTestNacl('libgcc_mixed_link.out', nexe, |
| 573 ['9', '3']) |
| 574 mixedlink_env.AddNodeToTestSuite(node, ['nonpexe_tests', 'small_tests'], |
| 575 'run_libgcc_mixed_link_test') |
OLD | NEW |