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

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

Issue 454593002: PNaCl driver: Add libgcc to mixed native/bitcode links (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: explicitly modify env rather than using var expansion Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « pnacl/driver/nativeld.py ('k') | tests/toolchain/nacl.scons » ('j') | 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 # 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 Run(env.get('CC') + env.get('CC_FLAGS')) 490 Run(env.get('CC') + env.get('CC_FLAGS'))
491 return 0 491 return 0
492 492
493 unmatched = env.get('UNMATCHED') 493 unmatched = env.get('UNMATCHED')
494 if len(unmatched) > 0: 494 if len(unmatched) > 0:
495 UnrecognizedOption(*unmatched) 495 UnrecognizedOption(*unmatched)
496 496
497 # If -arch was given, we are compiling directly to native code 497 # If -arch was given, we are compiling directly to native code
498 compiling_to_native = GetArch() is not None 498 compiling_to_native = GetArch() is not None
499 499
500 if env.getbool('ALLOW_NATIVE') and not compiling_to_native: 500 if env.getbool('ALLOW_NATIVE'):
501 Log.Fatal("--pnacl-allow-native without -arch is not meaningful.") 501 if not compiling_to_native:
502 Log.Fatal("--pnacl-allow-native without -arch is not meaningful.")
503 # For native/mixed links, also bring in the native libgcc to avoid link
504 # failure if pre-translated native code needs functions from it.
505 env.append('LD_FLAGS', env.eval('-L${LIBS_NATIVE_ARCH}'))
506 env.append('STDLIBS', '-lgcc')
507
502 508
503 if not env.get('STDLIB'): 509 if not env.get('STDLIB'):
504 # Default C++ Standard Library. 510 # Default C++ Standard Library.
505 SetStdLib('libc++') 511 SetStdLib('libc++')
506 512
507 inputs = env.get('INPUTS') 513 inputs = env.get('INPUTS')
508 output = env.getone('OUTPUT') 514 output = env.getone('OUTPUT')
509 515
510 if len(inputs) == 0: 516 if len(inputs) == 0:
511 if env.getbool('VERBOSE'): 517 if env.getbool('VERBOSE'):
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 -g Generate complete debug information. 790 -g Generate complete debug information.
785 -gline-tables-only Generate debug line-information only 791 -gline-tables-only Generate debug line-information only
786 (allowing for stack traces). 792 (allowing for stack traces).
787 -flimit-debug-info Generate limited debug information. 793 -flimit-debug-info Generate limited debug information.
788 -save-temps Keep intermediate compilation results. 794 -save-temps Keep intermediate compilation results.
789 -v Verbose output / show commands. 795 -v Verbose output / show commands.
790 -h | --help Show this help. 796 -h | --help Show this help.
791 --help-full Show underlying clang driver's help message 797 --help-full Show underlying clang driver's help message
792 (warning: not all options supported). 798 (warning: not all options supported).
793 """ % (tool) 799 """ % (tool)
OLDNEW
« no previous file with comments | « pnacl/driver/nativeld.py ('k') | tests/toolchain/nacl.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698