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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
434 driver_tools.RunDriver('nativeld', args) | 434 driver_tools.RunDriver('nativeld', args) |
435 | 435 |
436 def RunHostLD(infile, outfile): | 436 def RunHostLD(infile, outfile): |
437 if env.getone('TARGET_OS') == 'linux': | 437 if env.getone('TARGET_OS') == 'linux': |
438 driver_tools.Run(['objcopy', '--redefine-sym', '_start=_user_start', | 438 driver_tools.Run(['objcopy', '--redefine-sym', '_start=_user_start', |
439 infile]) | 439 infile]) |
440 lib_dir = (env.getone('BASE_LIB_NATIVE') | 440 lib_dir = (env.getone('BASE_LIB_NATIVE') |
441 + 'x86-32-%s/lib' % env.getone('TARGET_OS')) | 441 + 'x86-32-%s/lib' % env.getone('TARGET_OS')) |
442 args = ['gcc', '-m32', infile, '-o', outfile, | 442 args = ['gcc', '-m32', infile, '-o', outfile, |
443 os.path.join(lib_dir, 'unsandboxed_irt.o'), | 443 os.path.join(lib_dir, 'unsandboxed_irt.o'), |
| 444 os.path.join(lib_dir, 'irt_random.o'), |
444 os.path.join(lib_dir, 'irt_query_list.o'), | 445 os.path.join(lib_dir, 'irt_query_list.o'), |
445 '-lpthread'] | 446 '-lpthread'] |
446 if env.getone('TARGET_OS') == 'linux': | 447 if env.getone('TARGET_OS') == 'linux': |
447 args.append('-lrt') # For clock_gettime() | 448 args.append('-lrt') # For clock_gettime() |
448 driver_tools.Run(args) | 449 driver_tools.Run(args) |
449 | 450 |
450 def RunLLC(infile, outfile, outfiletype): | 451 def RunLLC(infile, outfile, outfiletype): |
451 env.push() | 452 env.push() |
452 env.setmany(input=infile, output=outfile, outfiletype=outfiletype) | 453 env.setmany(input=infile, output=outfile, outfiletype=outfiletype) |
453 if env.getbool('SANDBOXED'): | 454 if env.getbool('SANDBOXED'): |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
539 | 540 |
540 ADVANCED OPTIONS: | 541 ADVANCED OPTIONS: |
541 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. | 542 -mattr=<+feat1,-feat2> Toggle specific cpu features on and off. |
542 -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 |
543 turns cpu features on and off. | 544 turns cpu features on and off. |
544 -S Generate native assembly only. | 545 -S Generate native assembly only. |
545 -c Generate native object file only. | 546 -c Generate native object file only. |
546 --pnacl-sb Use the translator which runs inside the NaCl sandbox. | 547 --pnacl-sb Use the translator which runs inside the NaCl sandbox. |
547 -O[0-3] Change translation-time optimization level. | 548 -O[0-3] Change translation-time optimization level. |
548 """ | 549 """ |
OLD | NEW |