OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/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 # Global environment and expression parsing for the PNaCl driver | 6 # Global environment and expression parsing for the PNaCl driver |
7 | 7 |
8 | 8 |
9 # This dictionary initializes a shell-like environment. | 9 # This dictionary initializes a shell-like environment. |
10 # Shell escaping and ${} substitution are provided. | 10 # Shell escaping and ${} substitution are provided. |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 123 |
124 'SCONS_STAGING' : '${SCONS_STAGING_%ARCH%}', | 124 'SCONS_STAGING' : '${SCONS_STAGING_%ARCH%}', |
125 'SCONS_STAGING_X8632' : '${SCONS_OUT}/opt-${SCONS_OS}-x86-32/staging', | 125 'SCONS_STAGING_X8632' : '${SCONS_OUT}/opt-${SCONS_OS}-x86-32/staging', |
126 'SCONS_STAGING_X8664' : '${SCONS_OUT}/opt-${SCONS_OS}-x86-64/staging', | 126 'SCONS_STAGING_X8664' : '${SCONS_OUT}/opt-${SCONS_OS}-x86-64/staging', |
127 'SCONS_STAGING_ARM' : '${SCONS_OUT}/opt-${SCONS_OS}-arm/staging', | 127 'SCONS_STAGING_ARM' : '${SCONS_OUT}/opt-${SCONS_OS}-arm/staging', |
128 'SCONS_STAGING_MIPS32': '${SCONS_OUT}/opt-${SCONS_OS}-mips32/staging', | 128 'SCONS_STAGING_MIPS32': '${SCONS_OUT}/opt-${SCONS_OS}-mips32/staging', |
129 | 129 |
130 'SEL_UNIVERSAL_PREFIX': '${USE_EMULATOR ? ${EMULATOR}}', | 130 'SEL_UNIVERSAL_PREFIX': '${USE_EMULATOR ? ${EMULATOR}}', |
131 'SEL_UNIVERSAL' : '${SCONS_STAGING}/sel_universal${EXEC_EXT}', | 131 'SEL_UNIVERSAL' : '${SCONS_STAGING}/sel_universal${EXEC_EXT}', |
132 # NOTE: -Q skips sel_ldr qualification tests, -c -c skips validation | 132 # NOTE: -Q skips sel_ldr qualification tests, -c -c skips validation |
133 # NOTE: We are not using -B to load the IRT, since the translators do not | |
134 # use the IRT. | |
135 'SEL_UNIVERSAL_FLAGS' : '--abort_on_error ' + | 133 'SEL_UNIVERSAL_FLAGS' : '--abort_on_error ' + |
136 '--uses_reverse_service ' + | |
137 '${USE_EMULATOR ? -Q -c -c --command_prefix ${EMULATOR
}}', | 134 '${USE_EMULATOR ? -Q -c -c --command_prefix ${EMULATOR
}}', |
138 | 135 |
139 'IRT_STAGING' : '${IRT_STAGING_%ARCH%}', | 136 'IRT_STAGING' : '${IRT_STAGING_%ARCH%}', |
140 'IRT_STAGING_X8632' : '${SCONS_OUT}/nacl_irt-x86-32/staging', | 137 'IRT_STAGING_X8632' : '${SCONS_OUT}/nacl_irt-x86-32/staging', |
141 'IRT_STAGING_X8664' : '${SCONS_OUT}/nacl_irt-x86-64/staging', | 138 'IRT_STAGING_X8664' : '${SCONS_OUT}/nacl_irt-x86-64/staging', |
142 'IRT_STAGING_ARM' : '${SCONS_OUT}/nacl_irt-arm/staging', | 139 'IRT_STAGING_ARM' : '${SCONS_OUT}/nacl_irt-arm/staging', |
143 'IRT_STAGING_MIPS32' : '${SCONS_OUT}/nacl_irt-mips32/staging', | 140 'IRT_STAGING_MIPS32' : '${SCONS_OUT}/nacl_irt-mips32/staging', |
144 'IRT_BLOB' : '${IRT_STAGING}/irt_core.nexe', | 141 'IRT_BLOB' : '${IRT_STAGING}/irt_core.nexe', |
145 | 142 |
146 'EMULATOR' : '${EMULATOR_%ARCH%}', | 143 'EMULATOR' : '${EMULATOR_%ARCH%}', |
(...skipping 368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
515 | 512 |
516 | 513 |
517 env = Environment() | 514 env = Environment() |
518 | 515 |
519 def override_env(meth_name, func): | 516 def override_env(meth_name, func): |
520 """Override a method in the global |env|, given the method name | 517 """Override a method in the global |env|, given the method name |
521 and the new function. | 518 and the new function. |
522 """ | 519 """ |
523 global env | 520 global env |
524 setattr(env, meth_name, types.MethodType(func, env, Environment)) | 521 setattr(env, meth_name, types.MethodType(func, env, Environment)) |
OLD | NEW |