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') |
@@ -378,10 +377,18 @@ |
return cflags_cc |
def GetCflagsObjC(self, configname): |
- """Returns flags that need to be added to .m compilations.""" |
+ """Returns flags that need to be added to .m and .mm compilations.""" |
self.configname = configname |
+ cflags_objc = [] |
+ |
+ gc_policy = self._Settings().get('GCC_ENABLE_OBJC_GC', 'unsupported') |
+ if gc_policy == 'supported': |
+ cflags_objc.append('-fobjc-gc') |
+ elif gc_policy == 'required': |
+ cflags_objc.append('-fobjc-gc-only') |
+ |
self.configname = None |
- return [] |
+ return cflags_objc |
def GetCflagsObjCC(self, configname): |
"""Returns flags that need to be added to .mm compilations.""" |