Index: pylib/gyp/xcode_emulation.py |
=================================================================== |
--- pylib/gyp/xcode_emulation.py (revision 1197) |
+++ pylib/gyp/xcode_emulation.py (working copy) |
@@ -277,7 +277,6 @@ |
self._Appendf(cflags, 'MACOSX_DEPLOYMENT_TARGET', '-mmacosx-version-min=%s') |
# TODO: |
- self._WarnUnimplemented('ARCHS') |
if self._Test('COPY_PHASE_STRIP', 'YES', default='NO'): |
self._WarnUnimplemented('COPY_PHASE_STRIP') |
self._WarnUnimplemented('GCC_DEBUGGING_SYMBOLS') |
@@ -288,10 +287,12 @@ |
self._WarnUnimplemented('MACH_O_TYPE') |
self._WarnUnimplemented('PRODUCT_TYPE') |
- # TODO: Do not hardcode arch. Supporting fat binaries will be annoying. |
- # Even if self._Settings()['ARCHS'] contains only a single arch, dependent |
- # targets might have been built with a different single arch. |
- cflags.append('-arch i386') |
+ archs = self._Settings().get('ARCHS', ['i386']) |
+ if len(archs) != 1: |
+ # TODO: Supporting fat binaries will be annoying. |
+ self._WarnUnimplemented('ARCHS') |
+ archs = ['i386'] |
+ cflags.append('-arch ' + archs[0]) |
cflags += self._Settings().get('OTHER_CFLAGS', []) |
cflags += self._Settings().get('WARNING_CFLAGS', []) |
@@ -393,8 +394,12 @@ |
'-Wl,' + gyp_to_build_path( |
self._Settings()['ORDER_FILE'])) |
- # TODO: Do not hardcode arch. Supporting fat binaries will be annoying. |
- ldflags.append('-arch i386') |
+ archs = self._Settings().get('ARCHS', ['i386']) |
+ if len(archs) != 1: |
+ # TODO: Supporting fat binaries will be annoying. |
+ self._WarnUnimplemented('ARCHS') |
+ archs = ['i386'] |
+ ldflags.append('-arch ' + archs[0]) |
# Xcode adds the product directory by default. |
ldflags.append('-L' + product_dir) |