lib/Linker: add support of deps which does not end with ".so".
It happens (for example) when you want to have a dependency on the .so with the specific version, like liblzma.so.1.0.0 or libcrypto.so.0.9.8. llvm-svn: 140201
This commit is contained in:
parent
6422e95c66
commit
5227ea6028
|
@ -141,6 +141,14 @@ static inline sys::Path IsLibrary(StringRef Name,
|
||||||
if (FullPath.isBitcodeFile()) // .so file containing bitcode?
|
if (FullPath.isBitcodeFile()) // .so file containing bitcode?
|
||||||
return FullPath;
|
return FullPath;
|
||||||
|
|
||||||
|
// Try libX form, to make it possible to add dependency on the
|
||||||
|
// specific version of .so, like liblzma.so.1.0.0
|
||||||
|
FullPath.eraseSuffix();
|
||||||
|
if (FullPath.isDynamicLibrary()) // Native shared library?
|
||||||
|
return FullPath;
|
||||||
|
if (FullPath.isBitcodeFile()) // .so file containing bitcode?
|
||||||
|
return FullPath;
|
||||||
|
|
||||||
// Not found .. fall through
|
// Not found .. fall through
|
||||||
|
|
||||||
// Indicate that the library was not found in the directory.
|
// Indicate that the library was not found in the directory.
|
||||||
|
|
Loading…
Reference in New Issue