Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(784)

Side by Side Diff: pnacl/driver/pnacl-translate.py

Issue 731423004: Add options for base dir and redirecting files to IRT open resource and use it. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: rebase Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
346 # split it. Non-ABI-stable pexes may have symbol naming and visibility 346 # split it. Non-ABI-stable pexes may have symbol naming and visibility
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 modules = env.getone('SPLIT_MODULE')
357 modules = env.getone('SPLIT_MODULE') 357 env.append('LLC_FLAGS_EXTRA', '-split-module=' + modules)
358 if modules != '1': 358 env.append('LD_FLAGS', '-split-module=' + modules)
359 env.append('LLC_FLAGS_EXTRA', '-split-module=' + modules) 359 # Do not set -streaming-bitcode for sandboxed mode, because it is already
360 env.append('LD_FLAGS', '-split-module=' + modules) 360 # in the default command line.
361 if not env.getbool('SANDBOXED') and env.getbool('STREAM_BITCODE'): 361 if not env.getbool('SANDBOXED') and env.getbool('STREAM_BITCODE'):
362 # Do not set -streaming-bitcode for sandboxed mode, because it is already 362 env.append('LLC_FLAGS_EXTRA', '-streaming-bitcode')
363 # in the default command line.
364 env.append('LLC_FLAGS_EXTRA', '-streaming-bitcode')
365 363
366 # If there's a bitcode file, translate it now. 364 # If there's a bitcode file, translate it now.
367 tng = driver_tools.TempNameGen(inputs + bcfiles, output) 365 tng = driver_tools.TempNameGen(inputs + bcfiles, output)
368 output_type = env.getone('OUTPUT_TYPE') 366 output_type = env.getone('OUTPUT_TYPE')
369 if bcfile: 367 if bcfile:
370 sfile = None 368 sfile = None
371 if output_type == 's': 369 if output_type == 's':
372 sfile = output 370 sfile = output
373 371
374 ofile = None 372 ofile = None
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 540
543 ADVANCED OPTIONS: 541 ADVANCED OPTIONS:
544 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. 542 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off.
545 -mcpu=<cpu-name> Target a specific cpu type. Tunes code as well as 543 -mcpu=<cpu-name> Target a specific cpu type. Tunes code as well as
546 turns cpu features on and off. 544 turns cpu features on and off.
547 -S Generate native assembly only. 545 -S Generate native assembly only.
548 -c Generate native object file only. 546 -c Generate native object file only.
549 --pnacl-sb Use the translator which runs inside the NaCl sandbox. 547 --pnacl-sb Use the translator which runs inside the NaCl sandbox.
550 -O[0-3] Change translation-time optimization level. 548 -O[0-3] Change translation-time optimization level.
551 """ 549 """
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698