| 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 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 170 'LLVM_OPT' : '${BASE_LLVM_BIN}/opt${EXEC_EXT}', | 170 'LLVM_OPT' : '${BASE_LLVM_BIN}/opt${EXEC_EXT}', |
| 171 'LLVM_DIS' : '${BASE_LLVM_BIN}/llvm-dis${EXEC_EXT}', | 171 'LLVM_DIS' : '${BASE_LLVM_BIN}/llvm-dis${EXEC_EXT}', |
| 172 'LLVM_NM' : '${BASE_LLVM_BIN}/llvm-nm${EXEC_EXT}', | 172 'LLVM_NM' : '${BASE_LLVM_BIN}/llvm-nm${EXEC_EXT}', |
| 173 # llvm-as compiles llvm assembly (.ll) to bitcode (.bc/.po) | 173 # llvm-as compiles llvm assembly (.ll) to bitcode (.bc/.po) |
| 174 'LLVM_AS' : '${BASE_LLVM_BIN}/llvm-as${EXEC_EXT}', | 174 'LLVM_AS' : '${BASE_LLVM_BIN}/llvm-as${EXEC_EXT}', |
| 175 'PNACL_ABICHECK': '${BASE_LLVM_BIN}/pnacl-abicheck${EXEC_EXT}', | 175 'PNACL_ABICHECK': '${BASE_LLVM_BIN}/pnacl-abicheck${EXEC_EXT}', |
| 176 'PNACL_COMPRESS': '${BASE_LLVM_BIN}/pnacl-bccompress${EXEC_EXT}', | 176 'PNACL_COMPRESS': '${BASE_LLVM_BIN}/pnacl-bccompress${EXEC_EXT}', |
| 177 | 177 |
| 178 # Native LLVM tools | 178 # Native LLVM tools |
| 179 'LLVM_PNACL_LLC': '${BASE_LLVM_BIN}/pnacl-llc${EXEC_EXT}', | 179 'LLVM_PNACL_LLC': '${BASE_LLVM_BIN}/pnacl-llc${EXEC_EXT}', |
| 180 'LLVM_PNACL_SZ': '${BASE_LLVM_BIN}/pnacl-sz${EXEC_EXT}', |
| 180 # llvm-mc is llvm's native assembler | 181 # llvm-mc is llvm's native assembler |
| 181 'LLVM_MC' : '${BASE_LLVM_BIN}/llvm-mc${EXEC_EXT}', | 182 'LLVM_MC' : '${BASE_LLVM_BIN}/llvm-mc${EXEC_EXT}', |
| 182 | 183 |
| 183 # Binutils | 184 # Binutils |
| 184 'BINUTILS_BASE' : '${BASE_BINUTILS}/bin/le32-nacl-', | 185 'BINUTILS_BASE' : '${BASE_BINUTILS}/bin/le32-nacl-', |
| 185 'OBJDUMP' : '${BINUTILS_BASE}objdump${EXEC_EXT}', | 186 'OBJDUMP' : '${BINUTILS_BASE}objdump${EXEC_EXT}', |
| 186 'NM' : '${BINUTILS_BASE}nm${EXEC_EXT}', | 187 'NM' : '${BINUTILS_BASE}nm${EXEC_EXT}', |
| 187 'AR' : '${BINUTILS_BASE}ar${EXEC_EXT}', | 188 'AR' : '${BINUTILS_BASE}ar${EXEC_EXT}', |
| 188 'RANLIB' : '${BINUTILS_BASE}ranlib${EXEC_EXT}', | 189 'RANLIB' : '${BINUTILS_BASE}ranlib${EXEC_EXT}', |
| 189 'READELF' : '${BINUTILS_BASE}readelf${EXEC_EXT}', | 190 'READELF' : '${BINUTILS_BASE}readelf${EXEC_EXT}', |
| (...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 518 |
| 518 | 519 |
| 519 env = Environment() | 520 env = Environment() |
| 520 | 521 |
| 521 def override_env(meth_name, func): | 522 def override_env(meth_name, func): |
| 522 """Override a method in the global |env|, given the method name | 523 """Override a method in the global |env|, given the method name |
| 523 and the new function. | 524 and the new function. |
| 524 """ | 525 """ |
| 525 global env | 526 global env |
| 526 setattr(env, meth_name, types.MethodType(func, env, Environment)) | 527 setattr(env, meth_name, types.MethodType(func, env, Environment)) |
| OLD | NEW |