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

Side by Side Diff: build/build_nexe.py

Issue 571143002: Pass -std=gnu++0x in build_nexe.py. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 6 years, 3 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 | « 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 """NEXE building script 6 """NEXE building script
7 7
8 This module will take a set of source files, include paths, library paths, and 8 This module will take a set of source files, include paths, library paths, and
9 additional arguments, and use them to build. 9 additional arguments, and use them to build.
10 """ 10 """
(...skipping 613 matching lines...) Expand 10 before | Expand all | Expand 10 after
624 624
625 compile_options = self.compile_options[:] 625 compile_options = self.compile_options[:]
626 _, ext = os.path.splitext(src) 626 _, ext = os.path.splitext(src)
627 if ext in ['.c', '.S']: 627 if ext in ['.c', '.S']:
628 bin_name = self.GetCCompiler() 628 bin_name = self.GetCCompiler()
629 compile_options.append('-std=gnu99') 629 compile_options.append('-std=gnu99')
630 if self.is_pnacl_toolchain and ext == '.S': 630 if self.is_pnacl_toolchain and ext == '.S':
631 compile_options.append('-arch') 631 compile_options.append('-arch')
632 compile_options.append(self.arch) 632 compile_options.append(self.arch)
633 elif ext in ['.cc', '.cpp']: 633 elif ext in ['.cc', '.cpp']:
634 compile_options.append('-std=gnu++0x')
635 compile_options.append('-Wno-deprecated-register')
634 bin_name = self.GetCXXCompiler() 636 bin_name = self.GetCXXCompiler()
635 else: 637 else:
636 if ext != '.h': 638 if ext != '.h':
637 self.Log('Skipping unknown type %s for %s.' % (ext, src)) 639 self.Log('Skipping unknown type %s for %s.' % (ext, src))
638 return None 640 return None
639 641
640 # This option is only applicable to C, and C++ compilers warn if 642 # This option is only applicable to C, and C++ compilers warn if
641 # it is present, so remove it for C++ to avoid the warning. 643 # it is present, so remove it for C++ to avoid the warning.
642 if ext != '.c' and '-Wstrict-prototypes' in compile_options: 644 if ext != '.c' and '-Wstrict-prototypes' in compile_options:
643 compile_options.remove('-Wstrict-prototypes') 645 compile_options.remove('-Wstrict-prototypes')
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
1142 shutil.copy(objs[0], options.name) 1144 shutil.copy(objs[0], options.name)
1143 else: 1145 else:
1144 build.Generate(objs) 1146 build.Generate(objs)
1145 return 0 1147 return 0
1146 except Error as e: 1148 except Error as e:
1147 sys.stderr.write('%s\n' % e) 1149 sys.stderr.write('%s\n' % e)
1148 return 1 1150 return 1
1149 1151
1150 if __name__ == '__main__': 1152 if __name__ == '__main__':
1151 sys.exit(Main(sys.argv)) 1153 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