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

Side by Side Diff: pylib/gyp/generator/make.py

Issue 6883065: make: Expose a 'linker_supports_icf' flag. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 9 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 | pylib/gyp/system_test.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/python 1 #!/usr/bin/python
2 2
3 # Copyright (c) 2009 Google Inc. All rights reserved. 3 # Copyright (c) 2009 Google Inc. 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 # Notes: 7 # Notes:
8 # 8 #
9 # This is all roughly based on the Makefile system used by the Linux 9 # This is all roughly based on the Makefile system used by the Linux
10 # kernel, but is a non-recursive make -- we put the entire dependency 10 # kernel, but is a non-recursive make -- we put the entire dependency
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 1252
1253 # TODO(evan): cache this output. (But then we'll need to add extra 1253 # TODO(evan): cache this output. (But then we'll need to add extra
1254 # flags to gyp to flush the cache, yuk! It's fast enough for now to 1254 # flags to gyp to flush the cache, yuk! It's fast enough for now to
1255 # just run it every time.) 1255 # just run it every time.)
1256 1256
1257 return { 'ARFLAGS.target': arflags_target, 1257 return { 'ARFLAGS.target': arflags_target,
1258 'ARFLAGS.host': arflags_host, 1258 'ARFLAGS.host': arflags_host,
1259 'LINK_flags': link_flags } 1259 'LINK_flags': link_flags }
1260 1260
1261 1261
1262 def CalculateVariables(default_variables, params):
1263 """Calculate additional variables for use in the build (called by gyp)."""
1264 cc_target = os.environ.get('CC.target', os.environ.get('CC', 'cc'))
1265 default_variables['LINKER_SUPPORTS_ICF'] = \
1266 gyp.system_test.TestLinkerSupportsICF(cc_command=cc_target)
1267
1268
1262 def GenerateOutput(target_list, target_dicts, data, params): 1269 def GenerateOutput(target_list, target_dicts, data, params):
1263 options = params['options'] 1270 options = params['options']
1264 generator_flags = params.get('generator_flags', {}) 1271 generator_flags = params.get('generator_flags', {})
1265 builddir_name = generator_flags.get('output_dir', 'out') 1272 builddir_name = generator_flags.get('output_dir', 'out')
1266 1273
1267 def CalculateMakefilePath(build_file, base_name): 1274 def CalculateMakefilePath(build_file, base_name):
1268 """Determine where to write a Makefile for a given gyp file.""" 1275 """Determine where to write a Makefile for a given gyp file."""
1269 # Paths in gyp files are relative to the .gyp file, but we want 1276 # Paths in gyp files are relative to the .gyp file, but we want
1270 # paths relative to the source root for the master makefile. Grab 1277 # paths relative to the source root for the master makefile. Grab
1271 # the path of the .gyp file as the base to relativize against. 1278 # the path of the .gyp file as the base to relativize against.
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
1414 # Add a check to make sure we tried to process all the .d files. 1421 # Add a check to make sure we tried to process all the .d files.
1415 all_deps += """ 1422 all_deps += """
1416 ifneq ($(word %(last)d,$(d_files)),) 1423 ifneq ($(word %(last)d,$(d_files)),)
1417 $(error Found unprocessed dependency files (gyp didn't generate enough rules !)) 1424 $(error Found unprocessed dependency files (gyp didn't generate enough rules !))
1418 endif 1425 endif
1419 """ % { 'last': ((num_outputs / 1000) + 1) * 1000 + 1 } 1426 """ % { 'last': ((num_outputs / 1000) + 1) * 1000 + 1 }
1420 1427
1421 root_makefile.write(SHARED_FOOTER % { 'generate_all_deps': all_deps }) 1428 root_makefile.write(SHARED_FOOTER % { 'generate_all_deps': all_deps })
1422 1429
1423 root_makefile.close() 1430 root_makefile.close()
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/system_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698