[compiler-rt] [llvm] [compiler-rt] Hide dlvsym call behind appropriate guards (PR #191440)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 10 08:02:31 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: google-yfyang
<details>
<summary>Changes</summary>
#<!-- -->191098 Add some unguarded dlvsym calls. This causes build issues when targeting certain platforms such as iOS.
This change should restore the original behavior.
---
Full diff: https://github.com/llvm/llvm-project/pull/191440.diff
1 Files Affected:
- (modified) compiler-rt/lib/interception/interception_linux.cpp (+2)
``````````diff
diff --git a/compiler-rt/lib/interception/interception_linux.cpp b/compiler-rt/lib/interception/interception_linux.cpp
index f2c959d2d05c6..ff22022909597 100644
--- a/compiler-rt/lib/interception/interception_linux.cpp
+++ b/compiler-rt/lib/interception/interception_linux.cpp
@@ -54,11 +54,13 @@ void* LookupSymbolNext(const char* symbol) {
return dlsym(RTLD_NEXT, symbol);
}
+#if SANITIZER_GLIBC || SANITIZER_FREEBSD || SANITIZER_NETBSD
void* LookupSymbolNextVersioned(const char* symbol, const char* version) {
if (!DynamicLoaderAvailable() || dlvsym == nullptr)
return nullptr;
return dlvsym(RTLD_NEXT, symbol, version);
}
+# endif // SANITIZER_GLIBC || SANITIZER_FREEBSD || SANITIZER_NETBSD
} // namespace __interception
``````````
</details>
https://github.com/llvm/llvm-project/pull/191440
More information about the llvm-commits
mailing list