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 import driver_tools | 6 import driver_tools |
7 import filetype | 7 import filetype |
8 import ldtools | 8 import ldtools |
9 import multiprocessing | 9 import multiprocessing |
10 import os | 10 import os |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 ( '-S', "env.set('OUTPUT_TYPE', 's')"), # Stop at .s | 147 ( '-S', "env.set('OUTPUT_TYPE', 's')"), # Stop at .s |
148 ( '-c', "env.set('OUTPUT_TYPE', 'o')"), # Stop at .o | 148 ( '-c', "env.set('OUTPUT_TYPE', 'o')"), # Stop at .o |
149 | 149 |
150 # Expose a very limited set of llc flags. | 150 # Expose a very limited set of llc flags. |
151 # BE CAREFUL: anything added here can introduce skew between | 151 # BE CAREFUL: anything added here can introduce skew between |
152 # the pnacl-translate commandline tool and the in-browser translator. | 152 # the pnacl-translate commandline tool and the in-browser translator. |
153 # See: llvm/tools/pnacl-llc/srpc_main.cpp and | 153 # See: llvm/tools/pnacl-llc/srpc_main.cpp and |
154 # chromium/src/ppapi/native_client/src/trusted/plugin/pnacl_options.cc | 154 # chromium/src/ppapi/native_client/src/trusted/plugin/pnacl_options.cc |
155 ( '(-sfi-.+)', "env.append('LLC_FLAGS_EXTRA', $0)"), | 155 ( '(-sfi-.+)', "env.append('LLC_FLAGS_EXTRA', $0)"), |
156 ( '(-mtls-use-call)', "env.append('LLC_FLAGS_EXTRA', $0)"), | 156 ( '(-mtls-use-call)', "env.append('LLC_FLAGS_EXTRA', $0)"), |
| 157 ( '(-force-align-stack)', "env.append('LLC_FLAGS_EXTRA', $0)"), |
157 # These flags are usually used for linktime dead code/data | 158 # These flags are usually used for linktime dead code/data |
158 # removal but also help with reloc overflows on ARM | 159 # removal but also help with reloc overflows on ARM |
159 ( '(-fdata-sections)', "env.append('LLC_FLAGS_EXTRA', $0)"), | 160 ( '(-fdata-sections)', "env.append('LLC_FLAGS_EXTRA', $0)"), |
160 ( '(-ffunction-sections)', "env.append('LLC_FLAGS_EXTRA', $0)"), | 161 ( '(-ffunction-sections)', "env.append('LLC_FLAGS_EXTRA', $0)"), |
161 ( '(--gc-sections)', "env.append('LD_FLAGS', $0)"), | 162 ( '(--gc-sections)', "env.append('LD_FLAGS', $0)"), |
162 ( '(-mattr=.*)', "env.append('LLC_FLAGS_EXTRA', $0)"), | 163 ( '(-mattr=.*)', "env.append('LLC_FLAGS_EXTRA', $0)"), |
163 ( '(-mcpu=.*)', "env.set('LLC_MCPU', '')\n" | 164 ( '(-mcpu=.*)', "env.set('LLC_MCPU', '')\n" |
164 "env.append('LLC_FLAGS_EXTRA', $0)"), | 165 "env.append('LLC_FLAGS_EXTRA', $0)"), |
165 ( '(-pnaclabi-verify=.*)', "env.append('LLC_FLAGS_EXTRA', $0)"), | 166 ( '(-pnaclabi-verify=.*)', "env.append('LLC_FLAGS_EXTRA', $0)"), |
166 ( '(-pnaclabi-verify-fatal-errors=.*)', "env.append('LLC_FLAGS_EXTRA', $0)"), | 167 ( '(-pnaclabi-verify-fatal-errors=.*)', "env.append('LLC_FLAGS_EXTRA', $0)"), |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
530 | 531 |
531 ADVANCED OPTIONS: | 532 ADVANCED OPTIONS: |
532 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. | 533 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. |
533 -mcpu=<cpu-name> Target a specific cpu type. Tunes code as well as | 534 -mcpu=<cpu-name> Target a specific cpu type. Tunes code as well as |
534 turns cpu features on and off. | 535 turns cpu features on and off. |
535 -S Generate native assembly only. | 536 -S Generate native assembly only. |
536 -c Generate native object file only. | 537 -c Generate native object file only. |
537 --pnacl-sb Use the translator which runs inside the NaCl sandbox. | 538 --pnacl-sb Use the translator which runs inside the NaCl sandbox. |
538 -O[0-3] Change translation-time optimization level. | 539 -O[0-3] Change translation-time optimization level. |
539 """ | 540 """ |
OLD | NEW |