OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2014 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2014 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.Bit('bitcode'): | 8 if not env.Bit('bitcode'): |
9 Return() | 9 Return() |
10 # Translating the PSO to an ELF DSO doesn't work on x86-64 yet. The | 10 # Translating the PSO to an ELF DSO doesn't work on x86-64 yet. The |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 node = env.CommandSelLdrTestNacl( | 77 node = env.CommandSelLdrTestNacl( |
78 'dynloader_test.out', dynloader_test, [dso1, dso2, dso3], | 78 'dynloader_test.out', dynloader_test, [dso1, dso2, dso3], |
79 # Add '-a' to enable filesystem access for opening DSOs. | 79 # Add '-a' to enable filesystem access for opening DSOs. |
80 sel_ldr_flags=['-a']) | 80 sel_ldr_flags=['-a']) |
81 env.AddNodeToTestSuite( | 81 env.AddNodeToTestSuite( |
82 node, ['small_tests', 'toolchain_tests'], | 82 node, ['small_tests', 'toolchain_tests'], |
83 'run_pnacl_dynamic_loading_test', is_broken=is_broken) | 83 'run_pnacl_dynamic_loading_test', is_broken=is_broken) |
84 | 84 |
85 | 85 |
86 # Use of the ConvertToPSO pass requires this toolchain version. | 86 # Use of the ConvertToPSO pass requires this toolchain version. |
87 if env['TOOLCHAIN_FEATURE_VERSION'] < 23: | 87 if env['TOOLCHAIN_FEATURE_VERSION'] < 24: |
88 Return() | 88 Return() |
89 | 89 |
90 test_pll = MakeAndTranslatePll('test_pll', 'test_pll.c') | 90 # TODO(smklein): These LLVM passes should be automatically applied by the |
| 91 # drivers. Once support for dependencies has been plumbed through the drivers, |
| 92 # use the "-l" linker flags and don't explicitly declare any LLVM passes. |
| 93 test_pll = MakeAndTranslatePso( |
| 94 'test_pll', [env.ComponentObject('test_pll.c')], |
| 95 llvm_passes='-nacl-global-cleanup -expand-varargs ' |
| 96 '-rewrite-pnacl-library-calls -rewrite-llvm-intrinsic-calls ' |
| 97 '-convert-to-pso -convert-to-pso-deps=libfoo.so,libbar.so ' |
| 98 '-pnacl-abi-simplify-postopt') |
| 99 |
91 test_pll_tls = MakeAndTranslatePll('test_pll_tls', 'test_pll_tls.c') | 100 test_pll_tls = MakeAndTranslatePll('test_pll_tls', 'test_pll_tls.c') |
92 | 101 |
93 pll_symbols_test = env.ComponentProgram( | 102 pll_symbols_test = env.ComponentProgram( |
94 'pll_symbols_test', ['pll_symbols_test.cc'], | 103 'pll_symbols_test', ['pll_symbols_test.cc'], |
95 EXTRA_LIBS=['${NONIRT_LIBS}', 'pnacl_dynloader', 'pll_loader_lib']) | 104 EXTRA_LIBS=['${NONIRT_LIBS}', 'pnacl_dynloader', 'pll_loader_lib']) |
96 | 105 |
97 node = env.CommandSelLdrTestNacl( | 106 node = env.CommandSelLdrTestNacl( |
98 'pll_symbols_test.out', pll_symbols_test, [test_pll, test_pll_tls], | 107 'pll_symbols_test.out', pll_symbols_test, [test_pll, test_pll_tls], |
99 # Add '-a' to enable filesystem access for opening DSOs. | 108 # Add '-a' to enable filesystem access for opening DSOs. |
100 sel_ldr_flags=['-a']) | 109 sel_ldr_flags=['-a']) |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 | 152 |
144 node = env.CommandSelLdrTestNacl( | 153 node = env.CommandSelLdrTestNacl( |
145 'pll_hello_world_test.out', pll_loader, | 154 'pll_hello_world_test.out', pll_loader, |
146 [translated_pll_libc, translated_pll_hello_world], | 155 [translated_pll_libc, translated_pll_hello_world], |
147 # Add '-a' to enable filesystem access for opening DSOs. | 156 # Add '-a' to enable filesystem access for opening DSOs. |
148 sel_ldr_flags=['-a'], | 157 sel_ldr_flags=['-a'], |
149 stdout_golden=env.File('../hello_world/hello_world.stdout')) | 158 stdout_golden=env.File('../hello_world/hello_world.stdout')) |
150 env.AddNodeToTestSuite( | 159 env.AddNodeToTestSuite( |
151 node, ['small_tests', 'toolchain_tests'], | 160 node, ['small_tests', 'toolchain_tests'], |
152 'run_pll_hello_world_test', is_broken=is_broken) | 161 'run_pll_hello_world_test', is_broken=is_broken) |
OLD | NEW |