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

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

Issue 134383002: Pass the mspdbsrv flag as a command line argument to the link wrapper. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 6 years, 11 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/win_tool.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 # Copyright (c) 2013 Google Inc. All rights reserved. 1 # Copyright (c) 2013 Google Inc. 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 import copy 5 import copy
6 import hashlib 6 import hashlib
7 import json 7 import json
8 import multiprocessing 8 import multiprocessing
9 import os.path 9 import os.path
10 import re 10 import re
(...skipping 1588 matching lines...) Expand 10 before | Expand all | Expand 10 after
1599 }[binary_type] 1599 }[binary_type]
1600 return '%(python)s gyp-win-tool link-with-manifests $arch %(embed)s ' \ 1600 return '%(python)s gyp-win-tool link-with-manifests $arch %(embed)s ' \
1601 '%(out)s "%(ldcmd)s" %(resname)s $mt $rc "$intermediatemanifest" ' \ 1601 '%(out)s "%(ldcmd)s" %(resname)s $mt $rc "$intermediatemanifest" ' \
1602 '$manifests' % { 1602 '$manifests' % {
1603 'python': sys.executable, 1603 'python': sys.executable,
1604 'out': out, 1604 'out': out,
1605 'ldcmd': ldcmd, 1605 'ldcmd': ldcmd,
1606 'resname': resource_name, 1606 'resname': resource_name,
1607 'embed': embed_manifest } 1607 'embed': embed_manifest }
1608 rule_name_suffix = _GetWinLinkRuleNameSuffix(embed_manifest) 1608 rule_name_suffix = _GetWinLinkRuleNameSuffix(embed_manifest)
1609 use_separate_mspdbsrv = os.environ.get('GYP_USE_SEPARATE_MSPDBSRV') != None
scottmg 2014/01/10 19:47:51 maybe something like int(os.environ.get('GYP_USE_
Sébastien Marchand 2014/01/11 00:00:39 Done.
1609 dlldesc = 'LINK%s(DLL) $binary' % rule_name_suffix.upper() 1610 dlldesc = 'LINK%s(DLL) $binary' % rule_name_suffix.upper()
1610 dllcmd = ('%s gyp-win-tool link-wrapper $arch ' 1611 dllcmd = ('%s gyp-win-tool link-wrapper $arch %s '
1611 '$ld /nologo $implibflag /DLL /OUT:$binary ' 1612 '$ld /nologo $implibflag /DLL /OUT:$binary '
1612 '@$binary.rsp' % sys.executable) 1613 '@$binary.rsp' %
1614 (sys.executable,
1615 'True' if use_separate_mspdbsrv else 'False'))
Sébastien Marchand 2014/01/10 18:08:23 I'm not satisfied with those 'True' and 'False' va
scottmg 2014/01/10 19:47:51 I think %s of |use_separate_mspdbsrv| directly is
Sébastien Marchand 2014/01/11 00:00:39 Done.
1613 dllcmd = FullLinkCommand(dllcmd, '$binary', 'dll') 1616 dllcmd = FullLinkCommand(dllcmd, '$binary', 'dll')
1614 master_ninja.rule('solink' + rule_name_suffix, 1617 master_ninja.rule('solink' + rule_name_suffix,
1615 description=dlldesc, command=dllcmd, 1618 description=dlldesc, command=dllcmd,
1616 rspfile='$binary.rsp', 1619 rspfile='$binary.rsp',
1617 rspfile_content='$libs $in_newline $ldflags', 1620 rspfile_content='$libs $in_newline $ldflags',
1618 restat=True, 1621 restat=True,
1619 pool='link_pool') 1622 pool='link_pool')
1620 master_ninja.rule('solink_module' + rule_name_suffix, 1623 master_ninja.rule('solink_module' + rule_name_suffix,
1621 description=dlldesc, command=dllcmd, 1624 description=dlldesc, command=dllcmd,
1622 rspfile='$binary.rsp', 1625 rspfile='$binary.rsp',
1623 rspfile_content='$libs $in_newline $ldflags', 1626 rspfile_content='$libs $in_newline $ldflags',
1624 restat=True, 1627 restat=True,
1625 pool='link_pool') 1628 pool='link_pool')
1626 # Note that ldflags goes at the end so that it has the option of 1629 # Note that ldflags goes at the end so that it has the option of
1627 # overriding default settings earlier in the command line. 1630 # overriding default settings earlier in the command line.
1628 exe_cmd = ('%s gyp-win-tool link-wrapper $arch ' 1631 exe_cmd = ('%s gyp-win-tool link-wrapper $arch %s '
1629 '$ld /nologo /OUT:$binary @$binary.rsp' % 1632 '$ld /nologo /OUT:$binary @$binary.rsp' %
1630 sys.executable) 1633 (sys.executable,
1634 'True' if use_separate_mspdbsrv else 'False'))
1631 exe_cmd = FullLinkCommand(exe_cmd, '$binary', 'exe') 1635 exe_cmd = FullLinkCommand(exe_cmd, '$binary', 'exe')
1632 master_ninja.rule('link' + rule_name_suffix, 1636 master_ninja.rule('link' + rule_name_suffix,
1633 description='LINK%s $binary' % rule_name_suffix.upper(), 1637 description='LINK%s $binary' % rule_name_suffix.upper(),
1634 command=exe_cmd, 1638 command=exe_cmd,
1635 rspfile='$binary.rsp', 1639 rspfile='$binary.rsp',
1636 rspfile_content='$in_newline $libs $ldflags', 1640 rspfile_content='$in_newline $libs $ldflags',
1637 pool='link_pool') 1641 pool='link_pool')
1638 1642
1639 1643
1640 def GenerateOutputForConfig(target_list, target_dicts, data, params, 1644 def GenerateOutputForConfig(target_list, target_dicts, data, params,
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 arglists.append( 2143 arglists.append(
2140 (target_list, target_dicts, data, params, config_name)) 2144 (target_list, target_dicts, data, params, config_name))
2141 pool.map(CallGenerateOutputForConfig, arglists) 2145 pool.map(CallGenerateOutputForConfig, arglists)
2142 except KeyboardInterrupt, e: 2146 except KeyboardInterrupt, e:
2143 pool.terminate() 2147 pool.terminate()
2144 raise e 2148 raise e
2145 else: 2149 else:
2146 for config_name in config_names: 2150 for config_name in config_names:
2147 GenerateOutputForConfig(target_list, target_dicts, data, params, 2151 GenerateOutputForConfig(target_list, target_dicts, data, params,
2148 config_name) 2152 config_name)
OLDNEW
« no previous file with comments | « no previous file | pylib/gyp/win_tool.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698