diff options
author | Bianca van Schaik <bvschaik@gmail.com> | 2021-01-15 10:20:21 +0100 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-01-20 10:26:54 -0500 |
commit | 7e615a540ea346716ba3d94b4bcecb35c42d5107 (patch) | |
tree | c79c9b74e3859d724f3e7cbf738a7a242b0b6e54 /Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx | |
parent | f2d92b983b8d46f54f4de050d5a10d59ba3ebec0 (diff) | |
download | cmake-7e615a540ea346716ba3d94b4bcecb35c42d5107.tar.gz |
file(GET_RUNTIME_DEPENDENCIES): Fix weak macOS libraries not detected
Starting with Clang 12, `otool -l` reports `LC_LOAD_WEAK_DYLIB` instead
of `LC_LOAD_DYLIB` for weakly linked libraries. Update the
implementation of `file(GET_RUNTIME_DEPENDENCIES)` to recognize these.
Fixes: #21684
Diffstat (limited to 'Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx')
-rw-r--r-- | Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx index 351d92aa82..6d97720c25 100644 --- a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx +++ b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx @@ -44,7 +44,7 @@ bool cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool::GetFileInfo( std::string line; static const cmsys::RegularExpression rpathRegex("^ *cmd LC_RPATH$"); static const cmsys::RegularExpression loadDylibRegex( - "^ *cmd LC_LOAD_DYLIB$"); + "^ *cmd LC_LOAD(_WEAK)?_DYLIB$"); static const cmsys::RegularExpression pathRegex( "^ *path (.*) \\(offset [0-9]+\\)$"); static const cmsys::RegularExpression nameRegex( |