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

Side by Side Diff: build/build_nexe.py

Issue 11576019: build_nexe.py: Allow --strip-debug for archives (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 8 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
« 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 from optparse import OptionParser 6 from optparse import OptionParser
7 import os 7 import os
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 import tempfile 10 import tempfile
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 def Generate(self, srcs): 488 def Generate(self, srcs):
489 """Generate final output file. 489 """Generate final output file.
490 490
491 Link or Archive the final output file, from the compiled sources. 491 Link or Archive the final output file, from the compiled sources.
492 """ 492 """
493 if self.outtype in ['nexe', 'pexe', 'nso']: 493 if self.outtype in ['nexe', 'pexe', 'nso']:
494 out = self.Link(srcs) 494 out = self.Link(srcs)
495 if self.strip_all or self.strip_debug: 495 if self.strip_all or self.strip_debug:
496 self.Strip(out) 496 self.Strip(out)
497 elif self.outtype in ['nlib', 'plib']: 497 elif self.outtype in ['nlib', 'plib']:
498 self.Archive(srcs) 498 out = self.Archive(srcs)
499 # Also valid to strip archives, but strip_all seems dangerous.
Roland McGrath 2012/12/13 20:51:39 Indeed, --strip-all makes .a or .o files unusable.
500 if self.strip_debug:
Sam Clegg 2012/12/13 20:55:58 This seems a little confusing to me. If I specify
jvoung - send to chromium... 2012/12/13 21:23:23 Yeah, it shouldn't do less that strip-debug... Ok
501 self.Strip(out)
499 else: 502 else:
500 ErrOut('FAILED: Unknown outtype %s:\n' % (self.outtype)) 503 ErrOut('FAILED: Unknown outtype %s:\n' % (self.outtype))
501 504
502 505
503 def Main(argv): 506 def Main(argv):
504 parser = OptionParser() 507 parser = OptionParser()
505 parser.add_option('--empty', dest='empty', default=False, 508 parser.add_option('--empty', dest='empty', default=False,
506 help='Do not pass sources to library.', action='store_true') 509 help='Do not pass sources to library.', action='store_true')
507 parser.add_option('--no-suffix', dest='suffix', default=True, 510 parser.add_option('--no-suffix', dest='suffix', default=True,
508 help='Do not append arch suffix.', action='store_false') 511 help='Do not append arch suffix.', action='store_false')
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 out = build.Compile(filename) 576 out = build.Compile(filename)
574 if out: 577 if out:
575 objs.append(out) 578 objs.append(out)
576 # Do not link if building an object 579 # Do not link if building an object
577 if not options.compile_only: 580 if not options.compile_only:
578 build.Generate(objs) 581 build.Generate(objs)
579 return 0 582 return 0
580 583
581 if __name__ == '__main__': 584 if __name__ == '__main__':
582 sys.exit(Main(sys.argv)) 585 sys.exit(Main(sys.argv))
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