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

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: no extra_vars 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
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 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
745 lang = { 745 lang = {
746 '.c': 'c', 746 '.c': 'c',
747 '.cpp': 'cc', '.cc': 'cc', '.cxx': 'cc', 747 '.cpp': 'cc', '.cc': 'cc', '.cxx': 'cc',
748 '.m': 'm', 748 '.m': 'm',
749 '.mm': 'mm', 749 '.mm': 'mm',
750 }.get(ext, None) 750 }.get(ext, None)
751 if lang: 751 if lang:
752 result.append((source, obj, self._Gch(lang))) 752 result.append((source, obj, self._Gch(lang)))
753 return result 753 return result
754 754
755 def GetGchBuildCommands(self): 755 def GetPchBuildCommands(self):
756 """Returns [(path_to_gch, language_flag, language, header)]. 756 """Returns [(path_to_gch, language_flag, language, header)].
757 |path_to_gch| and |header| are relative to the build directory. 757 |path_to_gch| and |header| are relative to the build directory.
758 """ 758 """
759 if not self.header or not self.compile_headers: 759 if not self.header or not self.compile_headers:
760 return [] 760 return []
761 return [ 761 return [
762 (self._Gch('c'), '-x c-header', 'c', self.header), 762 (self._Gch('c'), '-x c-header', 'c', self.header),
763 (self._Gch('cc'), '-x c++-header', 'cc', self.header), 763 (self._Gch('cc'), '-x c++-header', 'cc', self.header),
764 (self._Gch('m'), '-x objective-c-header', 'm', self.header), 764 (self._Gch('m'), '-x objective-c-header', 'm', self.header),
765 (self._Gch('mm'), '-x objective-c++-header', 'mm', self.header), 765 (self._Gch('mm'), '-x objective-c++-header', 'mm', self.header),
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
1019 def GetSpecPostbuildCommands(spec, quiet=False): 1019 def GetSpecPostbuildCommands(spec, quiet=False):
1020 """Returns the list of postbuilds explicitly defined on |spec|, in a form 1020 """Returns the list of postbuilds explicitly defined on |spec|, in a form
1021 executable by a shell.""" 1021 executable by a shell."""
1022 postbuilds = [] 1022 postbuilds = []
1023 for postbuild in spec.get('postbuilds', []): 1023 for postbuild in spec.get('postbuilds', []):
1024 if not quiet: 1024 if not quiet:
1025 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % ( 1025 postbuilds.append('echo POSTBUILD\\(%s\\) %s' % (
1026 spec['target_name'], postbuild['postbuild_name'])) 1026 spec['target_name'], postbuild['postbuild_name']))
1027 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action'])) 1027 postbuilds.append(gyp.common.EncodePOSIXShellList(postbuild['action']))
1028 return postbuilds 1028 return postbuilds
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698