| 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 # IMPORTANT NOTE: If you make local mods to this file, you must run: | 6 # IMPORTANT NOTE: If you make local mods to this file, you must run: |
| 7 # % pnacl/build.sh driver | 7 # % pnacl/build.sh driver |
| 8 # in order for them to take effect in the scons build. This command | 8 # in order for them to take effect in the scons build. This command |
| 9 # updates the copy in the toolchain/ tree. | 9 # updates the copy in the toolchain/ tree. |
| 10 # | 10 # |
| 11 | 11 |
| 12 import driver_tools | 12 import driver_tools |
| 13 from driver_env import env | 13 from driver_env import env |
| 14 from driver_log import Log, TempFiles | 14 from driver_log import Log, TempFiles |
| 15 import sys | 15 import sys |
| 16 | 16 |
| 17 EXTRA_ENV = { | 17 EXTRA_ENV = { |
| 18 'INPUTS' : '', | 18 'INPUTS' : '', |
| 19 'OUTPUT' : '', | 19 'OUTPUT' : '', |
| 20 | 20 |
| 21 'MC_FLAGS' : '-assemble -filetype=obj ${MC_FLAGS_%ARCH%}', | 21 'MC_FLAGS' : '-assemble -filetype=obj ${MC_FLAGS_%ARCH%}', |
| 22 # maybe add the equivalent of -mfpu=vfp | 22 # maybe add the equivalent of -mfpu=vfp |
| 23 'MC_FLAGS_ARM' : '-arch=arm -triple=armv7a-nacl -mcpu=cortex-a8', | 23 'MC_FLAGS_ARM' : '-arch=arm -triple=armv7a-nacl -mcpu=cortex-a8', |
| 24 'MC_FLAGS_X8632' : '-arch=x86 -triple=i686-nacl', | 24 'MC_FLAGS_X8632' : '-arch=x86 -triple=i686-nacl', |
| 25 'MC_FLAGS_X8664' : '-arch=x86-64 -triple=x86_64-nacl', | 25 'MC_FLAGS_X8664' : '-arch=x86-64 -triple=x86_64-nacl', |
| 26 'MC_FLAGS_MIPS32': '-arch=mipsel -triple=mipsel-nacl', |
| 26 | 27 |
| 27 'RUN_LLVM_AS' : '${LLVM_AS} ${input} -o ${output}', | 28 'RUN_LLVM_AS' : '${LLVM_AS} ${input} -o ${output}', |
| 28 'RUN_LLVM_MC' : '${LLVM_MC} ${MC_FLAGS} ${input} -o ${output}', | 29 'RUN_LLVM_MC' : '${LLVM_MC} ${MC_FLAGS} ${input} -o ${output}', |
| 29 } | 30 } |
| 30 | 31 |
| 31 VERSION_STR = """Portable Native Client assembler | 32 VERSION_STR = """Portable Native Client assembler |
| 32 Compatibility: | 33 Compatibility: |
| 33 GNU assembler version 2.21.51 (pnacl-pc-nacl) using BFD version (GNU Binutils) 2
.21.51.20110525 | 34 GNU assembler version 2.21.51 (pnacl-pc-nacl) using BFD version (GNU Binutils) 2
.21.51.20110525 |
| 34 Low Level Virtual Machine (http://llvm.org/) | 35 Low Level Virtual Machine (http://llvm.org/) |
| 35 """ | 36 """ |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 Transform LLVM assembly (.ll) to LLVM bitcode. | 115 Transform LLVM assembly (.ll) to LLVM bitcode. |
| 115 | 116 |
| 116 Usage: pnacl-as [options] <input .ll file> -o <output.po> | 117 Usage: pnacl-as [options] <input .ll file> -o <output.po> |
| 117 | 118 |
| 118 OPTIONS: | 119 OPTIONS: |
| 119 -o <file> Output to file | 120 -o <file> Output to file |
| 120 --version Display version information | 121 --version Display version information |
| 121 -help | -h Output this help. | 122 -help | -h Output this help. |
| 122 """ | 123 """ |
| 123 | 124 |
| OLD | NEW |