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,15 @@ |
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) == 0: |
+ pass |
Nico
2012/02/13 06:09:07
I believe xcodebuild might default to i386 if ARCH
|
+ elif len(archs) == 1: |
+ cflags.append('-arch ' + archs[0]) |
Nico
2012/02/13 06:09:07
What if you have this setup:
{
'targets': [
{
|
+ else: |
+ # TODO: Supporting fat binaries will be annoying. |
+ self._WarnUnimplemented('ARCHS') |
+ cflags.append('-arch i386') |
cflags += self._Settings().get('OTHER_CFLAGS', []) |
cflags += self._Settings().get('WARNING_CFLAGS', []) |
@@ -393,8 +397,15 @@ |
'-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) == 0: |
+ pass |
+ elif 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) |