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

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

Issue 11742015: Support MASM in MSBuild and Winja (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: With tests Created 7 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
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | 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) 2012 Google Inc. All rights reserved. 1 # Copyright (c) 2012 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 multiprocessing 7 import multiprocessing
8 import os.path 8 import os.path
9 import re 9 import re
10 import signal 10 import signal
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 for source in sources: 780 for source in sources:
781 filename, ext = os.path.splitext(source) 781 filename, ext = os.path.splitext(source)
782 ext = ext[1:] 782 ext = ext[1:]
783 obj_ext = self.obj_ext 783 obj_ext = self.obj_ext
784 if ext in ('cc', 'cpp', 'cxx'): 784 if ext in ('cc', 'cpp', 'cxx'):
785 command = 'cxx' 785 command = 'cxx'
786 elif ext == 'c' or (ext == 'S' and self.flavor != 'win'): 786 elif ext == 'c' or (ext == 'S' and self.flavor != 'win'):
787 command = 'cc' 787 command = 'cc'
788 elif ext == 's' and self.flavor != 'win': # Doesn't generate .o.d files. 788 elif ext == 's' and self.flavor != 'win': # Doesn't generate .o.d files.
789 command = 'cc_s' 789 command = 'cc_s'
790 elif (self.flavor == 'win' and ext == 'asm' and 790 elif (self.flavor == 'win' and ext == 'asm' and not
791 self.msvs_settings.GetArch(config_name) == 'x86' and 791 self.msvs_settings.HasExplicitAsmRules(spec)):
792 not self.msvs_settings.HasExplicitAsmRules(spec)):
793 # Asm files only get auto assembled for x86 (not x64).
794 command = 'asm' 792 command = 'asm'
795 # Add the _asm suffix as msvs is capable of handling .cc and 793 # Add the _asm suffix as msvs is capable of handling .cc and
796 # .asm files of the same name without collision. 794 # .asm files of the same name without collision.
797 obj_ext = '_asm.obj' 795 obj_ext = '_asm.obj'
798 elif self.flavor == 'mac' and ext == 'm': 796 elif self.flavor == 'mac' and ext == 'm':
799 command = 'objc' 797 command = 'objc'
800 elif self.flavor == 'mac' and ext == 'mm': 798 elif self.flavor == 'mac' and ext == 'mm':
801 command = 'objcxx' 799 command = 'objcxx'
802 elif self.flavor == 'win' and ext == 'rc': 800 elif self.flavor == 'win' and ext == 'rc':
803 command = 'rc' 801 command = 'rc'
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after
1497 'rc', 1495 'rc',
1498 description='RC $in', 1496 description='RC $in',
1499 # Note: $in must be last otherwise rc.exe complains. 1497 # Note: $in must be last otherwise rc.exe complains.
1500 command=('%s gyp-win-tool rc-wrapper ' 1498 command=('%s gyp-win-tool rc-wrapper '
1501 '$arch $rc $defines $includes $rcflags /fo$out $in' % 1499 '$arch $rc $defines $includes $rcflags /fo$out $in' %
1502 sys.executable)) 1500 sys.executable))
1503 master_ninja.rule( 1501 master_ninja.rule(
1504 'asm', 1502 'asm',
1505 description='ASM $in', 1503 description='ASM $in',
1506 command=('%s gyp-win-tool asm-wrapper ' 1504 command=('%s gyp-win-tool asm-wrapper '
1507 '$arch $asm $defines $includes /c /Fo $out $in' % 1505 '$arch $defines $includes /c /Fo $out $in' %
1508 sys.executable)) 1506 sys.executable))
1509 1507
1510 if flavor != 'mac' and flavor != 'win': 1508 if flavor != 'mac' and flavor != 'win':
1511 master_ninja.rule( 1509 master_ninja.rule(
1512 'alink', 1510 'alink',
1513 description='AR $out', 1511 description='AR $out',
1514 command='rm -f $out && $ar rcs $out $in') 1512 command='rm -f $out && $ar rcs $out $in')
1515 master_ninja.rule( 1513 master_ninja.rule(
1516 'alink_thin', 1514 'alink_thin',
1517 description='AR $out', 1515 description='AR $out',
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
1781 arglists.append( 1779 arglists.append(
1782 (target_list, target_dicts, data, params, config_name)) 1780 (target_list, target_dicts, data, params, config_name))
1783 pool.map(CallGenerateOutputForConfig, arglists) 1781 pool.map(CallGenerateOutputForConfig, arglists)
1784 except KeyboardInterrupt, e: 1782 except KeyboardInterrupt, e:
1785 pool.terminate() 1783 pool.terminate()
1786 raise e 1784 raise e
1787 else: 1785 else:
1788 for config_name in config_names: 1786 for config_name in config_names:
1789 GenerateOutputForConfig(target_list, target_dicts, data, params, 1787 GenerateOutputForConfig(target_list, target_dicts, data, params,
1790 config_name) 1788 config_name)
OLDNEW
« no previous file with comments | « pylib/gyp/generator/msvs.py ('k') | pylib/gyp/win_tool.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698