[compiler-rt] aca4300 - [compiler-rt] Address dlvsym not found compilation error when targeting certain platforms (#191444)

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 09:06:39 PDT 2026


Author: google-yfyang
Date: 2026-04-10T12:06:35-04:00
New Revision: aca430027b0a308f6206dfbd7e66f57faf8a7700

URL: https://github.com/llvm/llvm-project/commit/aca430027b0a308f6206dfbd7e66f57faf8a7700
DIFF: https://github.com/llvm/llvm-project/commit/aca430027b0a308f6206dfbd7e66f57faf8a7700.diff

LOG: [compiler-rt] Address dlvsym not found compilation error when targeting certain platforms (#191444)

#191098 Add some unguarded dlvsym calls. This causes build issues when
targeting certain platforms such as iOS.

This change should restore the original behavior.

Added: 
    

Modified: 
    compiler-rt/lib/interception/interception_linux.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/interception/interception_linux.cpp b/compiler-rt/lib/interception/interception_linux.cpp
index f2c959d2d05c6..c997cc452256a 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
 


        


More information about the llvm-commits mailing list