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

Side by Side Diff: tools/win/split_link/split_link.py

Issue 15300017: Pull string constants into separate .cc for split dll build (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix export 2 Created 7 years, 7 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 | « build/split_link_partition.py ('k') | 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 # Copyright 2013 The Chromium Authors. All rights reserved. 1 # Copyright 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 """Takes the same arguments as Windows link.exe, and a definition of libraries 5 """Takes the same arguments as Windows link.exe, and a definition of libraries
6 to split into subcomponents. Does multiple passes of link.exe invocation to 6 to split into subcomponents. Does multiple passes of link.exe invocation to
7 determine exports between parts and generates .def and import libraries to 7 determine exports between parts and generates .def and import libraries to
8 cause symbols to be available to other parts.""" 8 cause symbols to be available to other parts."""
9 9
10 import _winreg 10 import _winreg
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
371 data_exports = 0 371 data_exports = 0
372 for i, part in enumerate(unresolved_by_part): 372 for i, part in enumerate(unresolved_by_part):
373 for export in part: 373 for export in part:
374 if IsDataDefinition(export): 374 if IsDataDefinition(export):
375 print 'part %d contains data export: %s (aka %s)' % ( 375 print 'part %d contains data export: %s (aka %s)' % (
376 i, Unmangle(export), export) 376 i, Unmangle(export), export)
377 data_exports += 1 377 data_exports += 1
378 deffiles = GenerateDefFiles(unresolved_by_part) 378 deffiles = GenerateDefFiles(unresolved_by_part)
379 import_libs = BuildImportLibs(flags, inputs_by_part, deffiles) 379 import_libs = BuildImportLibs(flags, inputs_by_part, deffiles)
380 else: 380 else:
381 return 1 381 if data_exports:
382 382 print '%d data exports found, see report above.' % data_exports
383 if data_exports: 383 print('These cannot be exported, and must be either duplicated to the '
384 print 'Data exports found, see report above.' 384 'target DLL (if constant), or wrapped in a function.')
385 print('These cannot be exported, and must be either duplicated to the '
386 'target DLL, or wrapped in a function.')
387 return 1 385 return 1
388 386
389 mt_exe = GetMtPath() 387 mt_exe = GetMtPath()
390 for i, dll in enumerate(dlls): 388 for i, dll in enumerate(dlls):
391 Log('embedding manifest in %s' % dll) 389 Log('embedding manifest in %s' % dll)
392 args = [mt_exe, '-nologo', '-manifest'] 390 args = [mt_exe, '-nologo', '-manifest']
393 args.append(ManifestNameForIndex(i)) 391 args.append(ManifestNameForIndex(i))
394 args.append(description['manifest']) 392 args.append(description['manifest'])
395 args.append('-outputresource:%s;2' % dll) 393 args.append('-outputresource:%s;2' % dll)
396 subprocess.check_call(args) 394 subprocess.check_call(args)
397 395
398 Log('built %r' % dlls) 396 Log('built %r' % dlls)
399 397
400 return 0 398 return 0
401 399
402 400
403 if __name__ == '__main__': 401 if __name__ == '__main__':
404 sys.exit(main()) 402 sys.exit(main())
OLDNEW
« no previous file with comments | « build/split_link_partition.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698