summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBianca van Schaik <bvschaik@gmail.com>2021-01-15 09:20:21 (GMT)
committerBrad King <brad.king@kitware.com>2021-01-20 15:26:54 (GMT)
commit7e615a540ea346716ba3d94b4bcecb35c42d5107 (patch)
treec79c9b74e3859d724f3e7cbf738a7a242b0b6e54 /Source
parentf2d92b983b8d46f54f4de050d5a10d59ba3ebec0 (diff)
downloadCMake-7e615a540ea346716ba3d94b4bcecb35c42d5107.zip
CMake-7e615a540ea346716ba3d94b4bcecb35c42d5107.tar.gz
CMake-7e615a540ea346716ba3d94b4bcecb35c42d5107.tar.bz2
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')
-rw-r--r--Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx b/Source/cmBinUtilsMacOSMachOOToolGetRuntimeDependenciesTool.cxx
index 351d92a..6d97720 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(