Issue #25136: merge from 3.5

This commit is contained in:
Ned Deily 2016-02-25 00:59:16 +11:00
commit b8da1a4fee
4 changed files with 41 additions and 2 deletions

View file

@ -136,6 +136,22 @@ def find_library_file(compiler, libname, std_dirs, paths):
p = p.rstrip(os.sep)
if host_platform == 'darwin' and is_macosx_sdk_path(p):
# Note that, as of Xcode 7, Apple SDKs may contain textual stub
# libraries with .tbd extensions rather than the normal .dylib
# shared libraries installed in /. The Apple compiler tool
# chain handles this transparently but it can cause problems
# for programs that are being built with an SDK and searching
# for specific libraries. Distutils find_library_file() now
# knows to also search for and return .tbd files. But callers
# of find_library_file need to keep in mind that the base filename
# of the returned SDK library file might have a different extension
# from that of the library file installed on the running system,
# for example:
# /Applications/Xcode.app/Contents/Developer/Platforms/
# MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/
# usr/lib/libedit.tbd
# vs
# /usr/lib/libedit.dylib
if os.path.join(sysroot, p[1:]) == dirname:
return [ ]