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 |