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

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: lib rule too 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 = (
1610 int(os.environ.get('GYP_USE_SEPARATE_MSPDBSRV', '0')) != 0)
1609 dlldesc = 'LINK%s(DLL) $binary' % rule_name_suffix.upper() 1611 dlldesc = 'LINK%s(DLL) $binary' % rule_name_suffix.upper()
1610 dllcmd = ('%s gyp-win-tool link-wrapper $arch ' 1612 dllcmd = ('%s gyp-win-tool link-wrapper $arch %s '
1611 '$ld /nologo $implibflag /DLL /OUT:$binary ' 1613 '$ld /nologo $implibflag /DLL /OUT:$binary '
1612 '@$binary.rsp' % sys.executable) 1614 '@$binary.rsp' % (sys.executable, use_separate_mspdbsrv))
1613 dllcmd = FullLinkCommand(dllcmd, '$binary', 'dll') 1615 dllcmd = FullLinkCommand(dllcmd, '$binary', 'dll')
1614 master_ninja.rule('solink' + rule_name_suffix, 1616 master_ninja.rule('solink' + rule_name_suffix,
1615 description=dlldesc, command=dllcmd, 1617 description=dlldesc, command=dllcmd,
1616 rspfile='$binary.rsp', 1618 rspfile='$binary.rsp',
1617 rspfile_content='$libs $in_newline $ldflags', 1619 rspfile_content='$libs $in_newline $ldflags',
1618 restat=True, 1620 restat=True,
1619 pool='link_pool') 1621 pool='link_pool')
1620 master_ninja.rule('solink_module' + rule_name_suffix, 1622 master_ninja.rule('solink_module' + rule_name_suffix,
1621 description=dlldesc, command=dllcmd, 1623 description=dlldesc, command=dllcmd,
1622 rspfile='$binary.rsp', 1624 rspfile='$binary.rsp',
1623 rspfile_content='$libs $in_newline $ldflags', 1625 rspfile_content='$libs $in_newline $ldflags',
1624 restat=True, 1626 restat=True,
1625 pool='link_pool') 1627 pool='link_pool')
1626 # Note that ldflags goes at the end so that it has the option of 1628 # Note that ldflags goes at the end so that it has the option of
1627 # overriding default settings earlier in the command line. 1629 # overriding default settings earlier in the command line.
1628 exe_cmd = ('%s gyp-win-tool link-wrapper $arch ' 1630 exe_cmd = ('%s gyp-win-tool link-wrapper $arch %s '
1629 '$ld /nologo /OUT:$binary @$binary.rsp' % 1631 '$ld /nologo /OUT:$binary @$binary.rsp' %
1630 sys.executable) 1632 (sys.executable, use_separate_mspdbsrv))
1631 exe_cmd = FullLinkCommand(exe_cmd, '$binary', 'exe') 1633 exe_cmd = FullLinkCommand(exe_cmd, '$binary', 'exe')
1632 master_ninja.rule('link' + rule_name_suffix, 1634 master_ninja.rule('link' + rule_name_suffix,
1633 description='LINK%s $binary' % rule_name_suffix.upper(), 1635 description='LINK%s $binary' % rule_name_suffix.upper(),
1634 command=exe_cmd, 1636 command=exe_cmd,
1635 rspfile='$binary.rsp', 1637 rspfile='$binary.rsp',
1636 rspfile_content='$in_newline $libs $ldflags', 1638 rspfile_content='$in_newline $libs $ldflags',
1637 pool='link_pool') 1639 pool='link_pool')
1638 1640
1639 1641
1640 def GenerateOutputForConfig(target_list, target_dicts, data, params, 1642 def GenerateOutputForConfig(target_list, target_dicts, data, params,
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
1885 master_ninja.rule( 1887 master_ninja.rule(
1886 'link', 1888 'link',
1887 description='LINK $out', 1889 description='LINK $out',
1888 command=('$ld $ldflags -o $out ' 1890 command=('$ld $ldflags -o $out '
1889 '-Wl,--start-group $in $solibs -Wl,--end-group $libs'), 1891 '-Wl,--start-group $in $solibs -Wl,--end-group $libs'),
1890 pool='link_pool') 1892 pool='link_pool')
1891 elif flavor == 'win': 1893 elif flavor == 'win':
1892 master_ninja.rule( 1894 master_ninja.rule(
1893 'alink', 1895 'alink',
1894 description='LIB $out', 1896 description='LIB $out',
1895 command=('%s gyp-win-tool link-wrapper $arch ' 1897 command=('%s gyp-win-tool link-wrapper $arch False '
1896 '$ar /nologo /ignore:4221 /OUT:$out @$out.rsp' % 1898 '$ar /nologo /ignore:4221 /OUT:$out @$out.rsp' %
1897 sys.executable), 1899 sys.executable),
1898 rspfile='$out.rsp', 1900 rspfile='$out.rsp',
1899 rspfile_content='$in_newline $libflags') 1901 rspfile_content='$in_newline $libflags')
1900 _AddWinLinkRules(master_ninja, embed_manifest=True) 1902 _AddWinLinkRules(master_ninja, embed_manifest=True)
1901 _AddWinLinkRules(master_ninja, embed_manifest=False) 1903 _AddWinLinkRules(master_ninja, embed_manifest=False)
1902 else: 1904 else:
1903 master_ninja.rule( 1905 master_ninja.rule(
1904 'objc', 1906 'objc',
1905 description='OBJC $out', 1907 description='OBJC $out',
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
2139 arglists.append( 2141 arglists.append(
2140 (target_list, target_dicts, data, params, config_name)) 2142 (target_list, target_dicts, data, params, config_name))
2141 pool.map(CallGenerateOutputForConfig, arglists) 2143 pool.map(CallGenerateOutputForConfig, arglists)
2142 except KeyboardInterrupt, e: 2144 except KeyboardInterrupt, e:
2143 pool.terminate() 2145 pool.terminate()
2144 raise e 2146 raise e
2145 else: 2147 else:
2146 for config_name in config_names: 2148 for config_name in config_names:
2147 GenerateOutputForConfig(target_list, target_dicts, data, params, 2149 GenerateOutputForConfig(target_list, target_dicts, data, params,
2148 config_name) 2150 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