Chromium Code Reviews| 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 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 347 # issues that the current splitting scheme doesn't account for. | 347 # issues that the current splitting scheme doesn't account for. |
| 348 # | 348 # |
| 349 # For now, also do not enable multi-threaded translation when TARGET_OS != | 349 # For now, also do not enable multi-threaded translation when TARGET_OS != |
| 350 # 'nacl', since in these cases we will be using the host toolchain's | 350 # 'nacl', since in these cases we will be using the host toolchain's |
| 351 # linker. | 351 # linker. |
| 352 # | 352 # |
| 353 # The x86->arm emulator is very flaky when threading is used, so don't | 353 # The x86->arm emulator is very flaky when threading is used, so don't |
| 354 # do module splitting when using it. | 354 # do module splitting when using it. |
| 355 env.set('SPLIT_MODULE', '1') | 355 env.set('SPLIT_MODULE', '1') |
| 356 else: | 356 else: |
| 357 modules = env.getone('SPLIT_MODULE') | 357 # Do not set -streaming-bitcode for sandboxed mode, because it is already |
| 358 if modules != '1': | 358 # in the default command line. |
| 359 env.append('LLC_FLAGS_EXTRA', '-split-module=' + modules) | |
| 360 env.append('LD_FLAGS', '-split-module=' + modules) | |
| 361 if not env.getbool('SANDBOXED') and env.getbool('STREAM_BITCODE'): | 359 if not env.getbool('SANDBOXED') and env.getbool('STREAM_BITCODE'): |
|
jvoung (off chromium)
2014/12/02 16:24:08
Had to revert this bit to stay within the "else:".
| |
| 362 # Do not set -streaming-bitcode for sandboxed mode, because it is already | |
| 363 # in the default command line. | |
| 364 env.append('LLC_FLAGS_EXTRA', '-streaming-bitcode') | 360 env.append('LLC_FLAGS_EXTRA', '-streaming-bitcode') |
| 361 modules = env.getone('SPLIT_MODULE') | |
| 362 env.append('LLC_FLAGS_EXTRA', '-split-module=' + modules) | |
| 363 env.append('LD_FLAGS', '-split-module=' + modules) | |
| 365 | 364 |
| 366 # If there's a bitcode file, translate it now. | 365 # If there's a bitcode file, translate it now. |
| 367 tng = driver_tools.TempNameGen(inputs + bcfiles, output) | 366 tng = driver_tools.TempNameGen(inputs + bcfiles, output) |
| 368 output_type = env.getone('OUTPUT_TYPE') | 367 output_type = env.getone('OUTPUT_TYPE') |
| 369 if bcfile: | 368 if bcfile: |
| 370 sfile = None | 369 sfile = None |
| 371 if output_type == 's': | 370 if output_type == 's': |
| 372 sfile = output | 371 sfile = output |
| 373 | 372 |
| 374 ofile = None | 373 ofile = None |
| (...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 542 | 541 |
| 543 ADVANCED OPTIONS: | 542 ADVANCED OPTIONS: |
| 544 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. | 543 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. |
| 545 -mcpu=<cpu-name> Target a specific cpu type. Tunes code as well as | 544 -mcpu=<cpu-name> Target a specific cpu type. Tunes code as well as |
| 546 turns cpu features on and off. | 545 turns cpu features on and off. |
| 547 -S Generate native assembly only. | 546 -S Generate native assembly only. |
| 548 -c Generate native object file only. | 547 -c Generate native object file only. |
| 549 --pnacl-sb Use the translator which runs inside the NaCl sandbox. | 548 --pnacl-sb Use the translator which runs inside the NaCl sandbox. |
| 550 -O[0-3] Change translation-time optimization level. | 549 -O[0-3] Change translation-time optimization level. |
| 551 """ | 550 """ |
| OLD | NEW |