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

Side by Side Diff: build/gyp_v8

Issue 14108010: Switch GYP script to not use utils.py anymore. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2012 the V8 project authors. All rights reserved. 3 # Copyright 2012 the V8 project authors. All rights reserved.
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions are 5 # modification, are permitted provided that the following conditions are
6 # met: 6 # met:
7 # 7 #
8 # * Redistributions of source code must retain the above copyright 8 # * Redistributions of source code must retain the above copyright
9 # notice, this list of conditions and the following disclaimer. 9 # notice, this list of conditions and the following disclaimer.
10 # * Redistributions in binary form must reproduce the above 10 # * Redistributions in binary form must reproduce the above
(...skipping 14 matching lines...) Expand all
25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 29
30 # This script is wrapper for V8 that adds some support for how GYP 30 # This script is wrapper for V8 that adds some support for how GYP
31 # is invoked by V8 beyond what can be done in the gclient hooks. 31 # is invoked by V8 beyond what can be done in the gclient hooks.
32 32
33 import glob 33 import glob
34 import os 34 import os
35 import platform
35 import shlex 36 import shlex
36 import sys 37 import sys
37 38
38 script_dir = os.path.dirname(__file__) 39 script_dir = os.path.dirname(__file__)
39 v8_root = os.path.normpath(os.path.join(script_dir, os.pardir)) 40 v8_root = os.path.normpath(os.path.join(script_dir, os.pardir))
40 41
41 if __name__ == '__main__': 42 if __name__ == '__main__':
42 os.chdir(v8_root) 43 os.chdir(v8_root)
43 script_dir = os.path.dirname(__file__) 44 script_dir = os.path.dirname(__file__)
44 v8_root = '.' 45 v8_root = '.'
45 46
46 sys.path.insert(0, os.path.join(v8_root, 'tools'))
47 import utils
48
49 sys.path.insert(0, os.path.join(v8_root, 'build', 'gyp', 'pylib')) 47 sys.path.insert(0, os.path.join(v8_root, 'build', 'gyp', 'pylib'))
50 import gyp 48 import gyp
51 49
52 50
53 def apply_gyp_environment(file_path=None): 51 def apply_gyp_environment(file_path=None):
54 """ 52 """
55 Reads in a *.gyp_env file and applies the valid keys to os.environ. 53 Reads in a *.gyp_env file and applies the valid keys to os.environ.
56 """ 54 """
57 if not file_path or not os.path.exists(file_path): 55 if not file_path or not os.path.exists(file_path):
58 return 56 return
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 # to enfore syntax checking. 155 # to enfore syntax checking.
158 syntax_check = os.environ.get('V8_GYP_SYNTAX_CHECK') 156 syntax_check = os.environ.get('V8_GYP_SYNTAX_CHECK')
159 if syntax_check and int(syntax_check): 157 if syntax_check and int(syntax_check):
160 args.append('--check') 158 args.append('--check')
161 159
162 print 'Updating projects from gyp files...' 160 print 'Updating projects from gyp files...'
163 sys.stdout.flush() 161 sys.stdout.flush()
164 162
165 # Generate for the architectures supported on the given platform. 163 # Generate for the architectures supported on the given platform.
166 gyp_args = list(args) 164 gyp_args = list(args)
167 if utils.GuessOS() == 'linux': 165 if platform.system() == 'linux':
168 gyp_args.append('--generator-output=out') 166 gyp_args.append('--generator-output=out')
169 run_gyp(gyp_args) 167 run_gyp(gyp_args)
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