| 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 # |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 'mac': {'X8632': 'i686-apple-darwin'}} | 232 'mac': {'X8632': 'i686-apple-darwin'}} |
| 233 env.set('TRIPLE', triple_map[env.getone('TARGET_OS')][base_arch]) | 233 env.set('TRIPLE', triple_map[env.getone('TARGET_OS')][base_arch]) |
| 234 | 234 |
| 235 # CPU that is representative of baseline feature requirements for NaCl | 235 # CPU that is representative of baseline feature requirements for NaCl |
| 236 # and/or chrome. We may want to make this more like "-mtune" | 236 # and/or chrome. We may want to make this more like "-mtune" |
| 237 # by specifying both "-mcpu=X" and "-mattr=+feat1,-feat2,...". | 237 # by specifying both "-mcpu=X" and "-mattr=+feat1,-feat2,...". |
| 238 # Note: this may be different from the in-browser translator, which may | 238 # Note: this may be different from the in-browser translator, which may |
| 239 # do auto feature detection based on CPUID, but constrained by what is | 239 # do auto feature detection based on CPUID, but constrained by what is |
| 240 # accepted by NaCl validators. | 240 # accepted by NaCl validators. |
| 241 cpu_map = { | 241 cpu_map = { |
| 242 'X8632': 'pentium4', | 242 'X8632': 'pentium4m', |
| 243 'X8664': 'core2', | 243 'X8664': 'x86-64', |
| 244 'ARM': 'cortex-a9', | 244 'ARM': 'cortex-a9', |
| 245 'MIPS32': 'mips32r2'} | 245 'MIPS32': 'mips32r2'} |
| 246 env.set('LLC_MCPU', '-mcpu=%s' % cpu_map[base_arch]) | 246 env.set('LLC_MCPU', '-mcpu=%s' % cpu_map[base_arch]) |
| 247 | 247 |
| 248 llc_flags_map = { | 248 llc_flags_map = { |
| 249 'ARM': ['-float-abi=hard', '-mattr=+neon'], | 249 'ARM': ['-float-abi=hard', '-mattr=+neon'], |
| 250 # Once PNaCl's build of compiler-rt (libgcc.a) defines __aeabi_* | 250 # Once PNaCl's build of compiler-rt (libgcc.a) defines __aeabi_* |
| 251 # functions, we can drop the following ad-hoc option. | 251 # functions, we can drop the following ad-hoc option. |
| 252 'ARM_NONSFI': ['-arm-enable-aeabi-functions=0'], | 252 'ARM_NONSFI': ['-arm-enable-aeabi-functions=0'], |
| 253 } | 253 } |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 495 | 495 |
| 496 ADVANCED OPTIONS: | 496 ADVANCED OPTIONS: |
| 497 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. | 497 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. |
| 498 -mcpu=<cpu-name> Target a specific cpu type. Tunes code as well as | 498 -mcpu=<cpu-name> Target a specific cpu type. Tunes code as well as |
| 499 turns cpu features on and off. | 499 turns cpu features on and off. |
| 500 -S Generate native assembly only. | 500 -S Generate native assembly only. |
| 501 -c Generate native object file only. | 501 -c Generate native object file only. |
| 502 --pnacl-sb Use the translator which runs inside the NaCl sandbox. | 502 --pnacl-sb Use the translator which runs inside the NaCl sandbox. |
| 503 -O[0-3] Change translation-time optimization level. | 503 -O[0-3] Change translation-time optimization level. |
| 504 """ | 504 """ |
| OLD | NEW |