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

Unified Diff: pylib/gyp/xcode_emulation.py

Issue 9382044: mac: Support ARCHS with zero or one element in the make and ninja generators. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 8 years, 10 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/archs/my_file.cc » ('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 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)
« no previous file with comments | « no previous file | test/mac/archs/my_file.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698