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

Side by Side Diff: pylib/gyp/xcode_emulation.py

Issue 10407108: ninja windows: support precompiled headers (Closed) Base URL: https://gyp.googlecode.com/svn/trunk
Patch Set: try from svn Created 8 years, 6 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 | « pylib/gyp/msvs_emulation.py ('k') | test/msvs/precompiled/gyptest-all.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 """ 5 """
6 This module contains classes that help to emulate xcodebuild behavior on top of 6 This module contains classes that help to emulate xcodebuild behavior on top of
7 other build systems, such as make and ninja. 7 other build systems, such as make and ninja.
8 """ 8 """
9 9
10 import gyp.common 10 import gyp.common
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 lang = { 747 lang = {
748 '.c': 'c', 748 '.c': 'c',
749 '.cpp': 'cc', '.cc': 'cc', '.cxx': 'cc', 749 '.cpp': 'cc', '.cc': 'cc', '.cxx': 'cc',
750 '.m': 'm', 750 '.m': 'm',
751 '.mm': 'mm', 751 '.mm': 'mm',
752 }.get(ext, None) 752 }.get(ext, None)
753 if lang: 753 if lang:
754 result.append((source, obj, self._Gch(lang))) 754 result.append((source, obj, self._Gch(lang)))
755 return result 755 return result
756 756
757 def GetGchBuildCommands(self): 757 def GetPchBuildCommands(self):
758 """Returns [(path_to_gch, language_flag, language, header)]. 758 """Returns [(path_to_gch, language_flag, language, header)].
759 |path_to_gch| and |header| are relative to the build directory. 759 |path_to_gch| and |header| are relative to the build directory.
760 """ 760 """
761 if not self.header or not self.compile_headers: 761 if not self.header or not self.compile_headers:
762 return [] 762 return []
763 return [ 763 return [
764 (self._Gch('c'), '-x c-header', 'c', self.header), 764 (self._Gch('c'), '-x c-header', 'c', self.header),
765 (self._Gch('cc'), '-x c++-header', 'cc', self.header), 765 (self._Gch('cc'), '-x c++-header', 'cc', self.header),
766 (self._Gch('m'), '-x objective-c-header', 'm', self.header), 766 (self._Gch('m'), '-x objective-c-header', 'm', self.header),
767 (self._Gch('mm'), '-x objective-c++-header', 'mm', self.header), 767 (self._Gch('mm'), '-x objective-c++-header', 'mm', self.header),
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1021 def GetSpecPostbuildCommands(spec, quiet=False): 1021 def GetSpecPostbuildCommands(spec, quiet=False):
1022 """Returns the list of postbuilds explicitly defined on |spec|, in a form 1022 """Returns the list of postbuilds explicitly defined on |spec|, in a form
1023 executable by a shell.""" 1023 executable by a shell."""
1024 postbuilds = [] 1024 postbuilds = []
1025 for postbuild in spec.get('postbuilds', []): 1025 for postbuild in spec.get('postbuilds', []):
1026 if not quiet: 1026 if not quiet:
1027 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( 1027 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % (
1028 spec['target_name'], postbuild['postbuild_name'])) 1028 spec['target_name'], postbuild['postbuild_name']))
1029 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) 1029 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action']))
1030 return postbuilds 1030 return postbuilds
OLDNEW
« no previous file with comments | « pylib/gyp/msvs_emulation.py ('k') | test/msvs/precompiled/gyptest-all.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698