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

Unified Diff: pylib/gyp/xcode_emulation.py

Issue 1275133004: Fallback to '.tbd' for system missing '.dylib'. (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: Created 5 years, 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/xcode_emulation.py
diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
index 47f9d520e10e0206be9cc7d32df2eedc61db57ea..8a1770bbc38c8dc808e50f299e647d8650906ebc 100644
--- a/pylib/gyp/xcode_emulation.py
+++ b/pylib/gyp/xcode_emulation.py
@@ -1032,7 +1032,15 @@ class XcodeSettings(object):
sdk_root = self._SdkPath(config_name)
if not sdk_root:
sdk_root = ''
- return l.replace('$(SDKROOT)', sdk_root)
+ if l.startswith('$(SDKROOT)'):
+ library = l.replace('$(SDKROOT)', sdk_root)
+ basename, ext = os.path.splitext(library)
+ if ext == '.dylib' and not os.path.exists(library):
+ tbd_library = basename + '.tbd'
+ if not os.path.exists(library) and os.path.exists(tbd_library):
+ l = os.path.splitext(l)[0] + '.tbd'
+ l = l.replace('$(SDKROOT)', sdk_root)
Mark Mentovai 2015/08/10 18:41:44 I don’t like the double-replace of SDKROOT.
sdefresne 2015/08/11 07:42:59 Fixed (with the double os.path.exists(library) too
+ return l
def AdjustLibraries(self, libraries, config_name=None):
"""Transforms entries like 'Cocoa.framework' in libraries into entries like
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698