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

Unified Diff: pylib/gyp/xcode_emulation.py

Issue 1745173002: Add support for iOS Frameworks with header maps. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Spacing nits Created 4 years, 9 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
Index: pylib/gyp/xcode_emulation.py
diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
index 3a9cbf7be943ebd94a8a885dc75b7f65635b1d93..73a7f69b452d2b340849647755e8f7cec27a7325 100644
--- a/pylib/gyp/xcode_emulation.py
+++ b/pylib/gyp/xcode_emulation.py
@@ -162,6 +162,7 @@ class XcodeSettings(object):
self.spec = spec
self.isIOS = False
+ self.header_map_path = None
# Per-target 'xcode_settings' are pushed down into configs earlier by gyp.
# This means self.xcode_settings[config] always contains all settings
@@ -222,6 +223,10 @@ class XcodeSettings(object):
default)
return format == "binary"
+ def IsIosFramework(self):
+ return self.spec['type'] == 'shared_library' and self._IsBundle() and \
+ self.isIOS
+
def _IsBundle(self):
return int(self.spec.get('mac_bundle', 0)) != 0 or self._IsXCTest()
@@ -489,6 +494,9 @@ class XcodeSettings(object):
if 'SDKROOT' in self._Settings() and sdk_root:
cflags.append('-isysroot %s' % sdk_root)
+ if self.header_map_path:
+ cflags.append('-I%s' % self.header_map_path)
+
if self._Test('CLANG_WARN_CONSTANT_CONVERSION', 'YES', default='NO'):
cflags.append('-Wconstant-conversion')
@@ -995,7 +1003,8 @@ class XcodeSettings(object):
be deployed to a device. This should be run as the very last step of the
build."""
if not (self.isIOS and
- (self.spec['type'] == 'executable' or self._IsXCTest())):
+ (self.spec['type'] == 'executable' or self._IsXCTest()) or
+ self.IsIosFramework()):
return []
settings = self.xcode_settings[configname]

Powered by Google App Engine
This is Rietveld 408576698