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

Side by Side Diff: build/gyp_chromium

Issue 705663002: Add GYP_INCLUDE_FIRST/LAST to chromium.gyp_env (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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 | build/gyp_helper.py » ('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 2
3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 # This script is wrapper for Chromium that adds some support for how GYP 7 # This script is wrapper for Chromium that adds some support for how GYP
8 # is invoked by Chromium beyond what can be done in the gclient hooks. 8 # is invoked by Chromium beyond what can be done in the gclient hooks.
9 9
10 import glob 10 import glob
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 specified_includes = set() 171 specified_includes = set()
172 for arg in args: 172 for arg in args:
173 if arg.startswith('-I') and len(arg) > 2: 173 if arg.startswith('-I') and len(arg) > 2:
174 specified_includes.add(os.path.realpath(arg[2:])) 174 specified_includes.add(os.path.realpath(arg[2:]))
175 175
176 result = [] 176 result = []
177 def AddInclude(path): 177 def AddInclude(path):
178 if os.path.realpath(path) not in specified_includes: 178 if os.path.realpath(path) not in specified_includes:
179 result.append(path) 179 result.append(path)
180 180
181 print "add first", os.environ.get('GYP_INCLUDE_FIRST')
Mark Mentovai 2014/11/04 22:28:23 Remove this line.
182 if os.environ.get('GYP_INCLUDE_FIRST') != None:
183 AddInclude(os.path.join(chrome_src, os.environ.get('GYP_INCLUDE_FIRST')))
184
181 # Always include common.gypi. 185 # Always include common.gypi.
182 AddInclude(os.path.join(script_dir, 'common.gypi')) 186 AddInclude(os.path.join(script_dir, 'common.gypi'))
183 187
184 # Optionally add supplemental .gypi files if present. 188 # Optionally add supplemental .gypi files if present.
185 for supplement in supplemental_files: 189 for supplement in supplemental_files:
186 AddInclude(supplement) 190 AddInclude(supplement)
187 191
192 if os.environ.get('GYP_INCLUDE_LAST') != None:
193 AddInclude(os.path.join(chrome_src, os.environ.get('GYP_INCLUDE_LAST')))
194
188 return result 195 return result
189 196
190 197
191 if __name__ == '__main__': 198 if __name__ == '__main__':
192 # Disabling garbage collection saves about 1 second out of 16 on a Linux 199 # Disabling garbage collection saves about 1 second out of 16 on a Linux
193 # z620 workstation. Since this is a short-lived process it's not a problem to 200 # z620 workstation. Since this is a short-lived process it's not a problem to
194 # leak a few cyclyc references in order to spare the CPU cycles for 201 # leak a few cyclyc references in order to spare the CPU cycles for
195 # scanning the heap. 202 # scanning the heap.
196 import gc 203 import gc
197 gc.disable() 204 gc.disable()
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 320
314 if not use_analyzer: 321 if not use_analyzer:
315 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs() 322 vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
316 if vs2013_runtime_dll_dirs: 323 if vs2013_runtime_dll_dirs:
317 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs 324 x64_runtime, x86_runtime = vs2013_runtime_dll_dirs
318 vs_toolchain.CopyVsRuntimeDlls( 325 vs_toolchain.CopyVsRuntimeDlls(
319 os.path.join(chrome_src, GetOutputDirectory()), 326 os.path.join(chrome_src, GetOutputDirectory()),
320 (x86_runtime, x64_runtime)) 327 (x86_runtime, x64_runtime))
321 328
322 sys.exit(gyp_rc) 329 sys.exit(gyp_rc)
OLDNEW
« no previous file with comments | « no previous file | build/gyp_helper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698