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

Unified Diff: trunk/pylib/gyp/xcodeproj_file.py

Issue 2878002: Xcode support for already-assembled .o (object) files as sources (Closed) Base URL: http://gyp.googlecode.com/svn/
Patch Set: Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/pylib/gyp/generator/xcode.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/pylib/gyp/xcodeproj_file.py
===================================================================
--- trunk/pylib/gyp/xcodeproj_file.py (revision 832)
+++ trunk/pylib/gyp/xcodeproj_file.py (working copy)
@@ -1451,6 +1451,7 @@
'm': 'sourcecode.c.objc',
'mm': 'sourcecode.cpp.objcpp',
'nib': 'wrapper.nib',
+ 'o': 'compiled.mach-o.objfile',
'pdf': 'image.pdf',
'pl': 'text.script.perl',
'plist': 'text.plist.xml',
@@ -1837,7 +1838,16 @@
return 'Frameworks'
def FileGroup(self, path):
- return (self.PBXProjectAncestor().FrameworksGroup(), False)
+ (root, ext) = posixpath.splitext(path)
+ if ext != '':
+ ext = ext[1:].lower()
+ if ext == 'o':
+ # .o files are added to Xcode Frameworks phases, but conceptually aren't
+ # frameworks, they're more like sources or intermediates. Redirect them
+ # to show up in one of those other groups.
+ return self.PBXProjectAncestor().RootGroupForPath(path)
+ else:
+ return (self.PBXProjectAncestor().FrameworksGroup(), False)
class PBXShellScriptBuildPhase(XCBuildPhase):
« no previous file with comments | « trunk/pylib/gyp/generator/xcode.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698