Chromium Code Reviews| 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,13 @@ |
| 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: |
| + cflags.append('-arch ' + archs[0]) |
| + else: |
| + # TODO: Supporting fat binaries will be annoying. |
| + self._WarnUnimplemented('ARCHS') |
| + cflags.append('-arch i386') |
|
Nico
2012/02/14 01:16:43
nit: It's a little shorter if written like
if len
ukai
2012/02/14 06:09:33
Done.
|
| cflags += self._Settings().get('OTHER_CFLAGS', []) |
| cflags += self._Settings().get('WARNING_CFLAGS', []) |
| @@ -393,8 +395,13 @@ |
| '-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: |
| + ldflags.append('-arch ' + archs[0]) |
| + else: |
| + # TODO: Supporting fat binaries will be annoying. |
| + self._WarnUnimplemented('ARCHS') |
| + ldflags.append('-arch i386') |
| # Xcode adds the product directory by default. |
| ldflags.append('-L' + product_dir) |