| Index: pylib/gyp/xcode_emulation.py
|
| diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
|
| index 47f9d520e10e0206be9cc7d32df2eedc61db57ea..5de9ac121d61f97351942ea8880f4dfdcd6cbbd6 100644
|
| --- a/pylib/gyp/xcode_emulation.py
|
| +++ b/pylib/gyp/xcode_emulation.py
|
| @@ -1032,7 +1032,23 @@ class XcodeSettings(object):
|
| sdk_root = self._SdkPath(config_name)
|
| if not sdk_root:
|
| sdk_root = ''
|
| - return l.replace('$(SDKROOT)', sdk_root)
|
| + # Xcode 7 started shipping with ".tbd" (text based stubs) files instead of
|
| + # ".dylib" without providing a real support for them. What it does, for
|
| + # "/usr/lib" libraries, is do "-L/usr/lib -lname" which is dependent on the
|
| + # library order and cause collision when building Chrome.
|
| + #
|
| + # Instead substitude ".tbd" to ".dylib" in the generated project when the
|
| + # following conditions are both true:
|
| + # - library is referenced in the gyp file as "$(SDKROOT)/**/*.dylib",
|
| + # - the ".dylib" file does not exists but a ".tbd" file do.
|
| + library = l.replace('$(SDKROOT)', sdk_root)
|
| + if l.startswith('$(SDKROOT)'):
|
| + basename, ext = os.path.splitext(library)
|
| + if ext == '.dylib' and not os.path.exists(library):
|
| + tbd_library = basename + '.tbd'
|
| + if os.path.exists(tbd_library):
|
| + library = tbd_library
|
| + return library
|
|
|
| def AdjustLibraries(self, libraries, config_name=None):
|
| """Transforms entries like 'Cocoa.framework' in libraries into entries like
|
|
|