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

Side by Side Diff: gyp_skia

Issue 332833002: Enable compiling with automatically-downloaded VS toolchain on Windows bots (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Upload from Linux Created 6 years, 6 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 | « no previous file | make.bat » ('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 2
3 # Copyright 2011 The Android Open Source Project 3 # Copyright 2011 The Android Open Source Project
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 # This script is a wrapper which invokes gyp with the correct --depth argument, 8 # This script is a wrapper which invokes gyp with the correct --depth argument,
9 # and supports the automatic regeneration of build files if all.gyp is 9 # and supports the automatic regeneration of build files if all.gyp is
10 # changed (Linux-only). 10 # changed (Linux-only).
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 default_gyp_generators = 'ninja,xcode' 86 default_gyp_generators = 'ninja,xcode'
87 elif sys.platform.startswith('win'): 87 elif sys.platform.startswith('win'):
88 default_gyp_generators = 'ninja,msvs-ninja' 88 default_gyp_generators = 'ninja,msvs-ninja'
89 elif sys.platform.startswith('cygwin'): 89 elif sys.platform.startswith('cygwin'):
90 default_gyp_generators = 'ninja,msvs-ninja' 90 default_gyp_generators = 'ninja,msvs-ninja'
91 else: 91 else:
92 default_gyp_generators = 'ninja' 92 default_gyp_generators = 'ninja'
93 os.environ[ENVVAR_GYP_GENERATORS] = default_gyp_generators 93 os.environ[ENVVAR_GYP_GENERATORS] = default_gyp_generators
94 print '%s is "%s"' % (ENVVAR_GYP_GENERATORS, os.getenv(ENVVAR_GYP_GENERATORS)) 94 print '%s is "%s"' % (ENVVAR_GYP_GENERATORS, os.getenv(ENVVAR_GYP_GENERATORS))
95 95
96 if os.getenv('CHROME_HEADLESS', '0') == '1':
97 if sys.platform.startswith('win') or sys.platform.startswith('cygwin'):
98 chrome_path = os.getenv('CHROME_PATH')
99 os.chdir(chrome_path)
100 sys.path.append(os.path.join(chrome_path, 'build'))
101 sys.path.append(os.path.join(chrome_path, 'tools'))
102 import vs_toolchain
103 vs_toolchain.Update()
104 vs_toolchain.GetToolchainDir()
105
96 # Set CWD to the directory containing this script. 106 # Set CWD to the directory containing this script.
97 # This allows us to launch it from other directories, in spite of gyp's 107 # This allows us to launch it from other directories, in spite of gyp's
98 # finickyness about the current working directory. 108 # finickyness about the current working directory.
99 # See http://b.corp.google.com/issue?id=5019517 ('Linux make build 109 # See http://b.corp.google.com/issue?id=5019517 ('Linux make build
100 # (from out dir) no longer runs skia_gyp correctly') 110 # (from out dir) no longer runs skia_gyp correctly')
101 os.chdir(os.path.abspath(script_dir)) 111 os.chdir(os.path.abspath(script_dir))
102 112
103 # This could give false positives since it doesn't actually do real option 113 # This could give false positives since it doesn't actually do real option
104 # parsing. Oh well. 114 # parsing. Oh well.
105 gyp_file_specified = False 115 gyp_file_specified = False
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 151
142 print 'Updating projects from gyp files...' 152 print 'Updating projects from gyp files...'
143 sys.stdout.flush() 153 sys.stdout.flush()
144 154
145 if '--dry-run' in args: 155 if '--dry-run' in args:
146 args.remove('--dry-run') 156 args.remove('--dry-run')
147 print gyp_source_dir, ' '.join(args) 157 print gyp_source_dir, ' '.join(args)
148 else: 158 else:
149 # Off we go... 159 # Off we go...
150 sys.exit(gyp.main(args)) 160 sys.exit(gyp.main(args))
OLDNEW
« no previous file with comments | « no previous file | make.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698