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

Unified Diff: pylib/gyp/xcode_emulation.py

Issue 10409007: mac ninja and make: Add support for GCC_ENABLE_OBJC_GC. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 8 years, 7 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 | « no previous file | test/mac/gyptest-objc-gc.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/xcode_emulation.py
===================================================================
--- pylib/gyp/xcode_emulation.py (revision 1382)
+++ pylib/gyp/xcode_emulation.py (working copy)
@@ -306,7 +306,6 @@
self._WarnUnimplemented('COPY_PHASE_STRIP')
self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS')
self._WarnUnimplemented('GCC_ENABLE_OBJC_EXCEPTIONS')
- self._WarnUnimplemented('GCC_ENABLE_OBJC_GC')
# TODO: This is exported correctly, but assigning to it is not supported.
self._WarnUnimplemented('MACH_O_TYPE')
@@ -377,16 +376,28 @@
self.configname = None
return cflags_cc
+ def _AddObjectiveCGarbageCollectionFlags(self, flags):
+ gc_policy = self._Settings().get('GCC_ENABLE_OBJC_GC', 'unsupported')
+ if gc_policy == 'supported':
+ flags.append('-fobjc-gc')
+ elif gc_policy == 'required':
+ flags.append('-fobjc-gc-only')
+
def GetCflagsObjC(self, configname):
"""Returns flags that need to be added to .m compilations."""
self.configname = configname
+ cflags_objc = []
+
+ self._AddObjectiveCGarbageCollectionFlags(cflags_objc)
+
self.configname = None
- return []
+ return cflags_objc
def GetCflagsObjCC(self, configname):
"""Returns flags that need to be added to .mm compilations."""
self.configname = configname
cflags_objcc = []
+ self._AddObjectiveCGarbageCollectionFlags(cflags_objcc)
if self._Test('GCC_OBJC_CALL_CXX_CDTORS', 'YES', default='NO'):
cflags_objcc.append('-fobjc-call-cxx-cdtors')
self.configname = None
« no previous file with comments | « no previous file | test/mac/gyptest-objc-gc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698