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

Side by Side Diff: ppapi/generators/generator.py

Issue 10908085: Add pnacl shims to the chrome build. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: presubmit Created 8 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
« no previous file with comments | « chrome/nacl.gypi ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp » ('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/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium 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 os 6 import os
7 import sys 7 import sys
8 8
9 # Note: some of these files are imported to register cmdline options. 9 # Note: some of these files are imported to register cmdline options.
10 from idl_generator import Generator 10 from idl_generator import Generator
11 from idl_option import ParseOptions 11 from idl_option import ParseOptions
12 from idl_outfile import IDLOutFile 12 from idl_outfile import IDLOutFile
13 from idl_parser import ParseFiles 13 from idl_parser import ParseFiles
14 from idl_c_header import HGen 14 from idl_c_header import HGen
15 from idl_gen_pnacl import PnaclGen 15 from idl_gen_pnacl import PnaclGen
16 16
17 17
18 def Main(): 18 def Main():
19 args = sys.argv[1:] 19 args = sys.argv[1:]
20 # If no arguments are provided, assume we are trying to rebuild the 20 # If no arguments are provided, assume we are trying to rebuild the
21 # C headers with warnings off. 21 # C headers with warnings off.
22 if not args: 22 if not args:
23 args = ['--wnone', '--cgen', '--range=start,end'] 23 args = [
24 '--wnone', '--cgen', '--range=start,end',
25 '--pnacl', '--pnaclshim',
26 '../native_client/src/untrusted/pnacl_irt_shim/pnacl_shim.c',
27 ]
24 current_dir = os.path.abspath(os.getcwd()) 28 current_dir = os.path.abspath(os.getcwd())
25 script_dir = os.path.abspath(os.path.dirname(__file__)) 29 script_dir = os.path.abspath(os.path.dirname(__file__))
26 if current_dir != script_dir: 30 if current_dir != script_dir:
27 print '\nIncorrect CWD, default run skipped.' 31 print '\nIncorrect CWD, default run skipped.'
28 print 'When running with no arguments set CWD to the scripts directory:' 32 print 'When running with no arguments set CWD to the scripts directory:'
29 print '\t' + script_dir + '\n' 33 print '\t' + script_dir + '\n'
30 print 'This ensures correct default paths and behavior.\n' 34 print 'This ensures correct default paths and behavior.\n'
31 return 1 35 return 1
32 36
33 filenames = ParseOptions(args) 37 filenames = ParseOptions(args)
34 ast = ParseFiles(filenames) 38 ast = ParseFiles(filenames)
35 return Generator.Run(ast) 39 return Generator.Run(ast)
36 40
37 41
38 if __name__ == '__main__': 42 if __name__ == '__main__':
39 sys.exit(Main()) 43 sys.exit(Main())
OLDNEW
« no previous file with comments | « chrome/nacl.gypi ('k') | ppapi/native_client/src/untrusted/pnacl_irt_shim/pnacl_irt_shim.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698