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

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

Issue 1695893002: Subzero: Enable "pnacl-translate -arch x86-64 --use-sz". (Closed) Base URL: https://chromium.googlesource.com/native_client/src/native_client.git@master
Patch Set: Created 4 years, 10 months 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 is_sandbox = '0' 283 is_sandbox = '0'
284 is_nonsfi = '0' 284 is_nonsfi = '0'
285 if env.getone('TARGET_OS') == 'nacl': 285 if env.getone('TARGET_OS') == 'nacl':
286 if env.getbool('NONSFI_NACL'): 286 if env.getbool('NONSFI_NACL'):
287 is_nonsfi = '1' 287 is_nonsfi = '1'
288 else: 288 else:
289 is_sandbox = '1' 289 is_sandbox = '1'
290 env.append('SZ_FLAGS_ARCH', '--sandbox=' + is_sandbox) 290 env.append('SZ_FLAGS_ARCH', '--sandbox=' + is_sandbox)
291 env.append('SZ_FLAGS_ARCH', '--nonsfi=' + is_nonsfi) 291 env.append('SZ_FLAGS_ARCH', '--nonsfi=' + is_nonsfi)
292 env.append('SZ_FLAGS_ARCH', '--target=' + base_arch.lower()) 292 env.append('SZ_FLAGS_ARCH', '--target=' + base_arch.lower())
293 if base_arch != 'X8632': 293 if base_arch not in ('X8632', 'X8664'):
294 env.set('SZ_UNSUPPORTED', '1') 294 env.set('SZ_UNSUPPORTED', '1')
295 # Hard-fail on an unsupported architecture. 295 # Hard-fail on an unsupported architecture.
296 if env.getbool('USE_SZ'): 296 if env.getbool('USE_SZ'):
297 Log.Fatal('Unsupported architecture when using --sz: ' + base_arch) 297 Log.Fatal('Unsupported architecture when using --sz: ' + base_arch)
298 # This is a fine place to map OPT_LEVEL to the Subzero equivalent, with 298 # This is a fine place to map OPT_LEVEL to the Subzero equivalent, with
299 # default of -O2. 299 # default of -O2.
300 sz_opt_map = { 300 sz_opt_map = {
301 '0': '-Om1', 301 '0': '-Om1',
302 '1': '-O2', 302 '1': '-O2',
303 '2': '-O2', 303 '2': '-O2',
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 -S Generate native assembly only. 607 -S Generate native assembly only.
608 -c Generate native object file only. 608 -c Generate native object file only.
609 --use-sz Use the Subzero fast translator. 609 --use-sz Use the Subzero fast translator.
610 --pnacl-sb Use the translator which runs inside the NaCl sandbox. 610 --pnacl-sb Use the translator which runs inside the NaCl sandbox.
611 Applies to both pnacl-llc and pnacl-sz translators. 611 Applies to both pnacl-llc and pnacl-sz translators.
612 -O[0-3] Change translation-time optimization level. 612 -O[0-3] Change translation-time optimization level.
613 -threads=<num> Use <num> parallel threads for translation. 613 -threads=<num> Use <num> parallel threads for translation.
614 -threads=auto Automatically determine number of translation threads. 614 -threads=auto Automatically determine number of translation threads.
615 -threads=seq Use the minimal number of threads for translation. 615 -threads=seq Use the minimal number of threads for translation.
616 """ 616 """
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698