[compiler-rt] e60b3fc - [sanitizer] Don't test __pthread_mutex_lock with GLIBC 2.34
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 12 23:42:14 PST 2021
Author: Vitaly Buka
Date: 2021-11-12T23:42:04-08:00
New Revision: e60b3fcefa62311a93a9f7c8589a1da5f25b1ba9
URL: https://github.com/llvm/llvm-project/commit/e60b3fcefa62311a93a9f7c8589a1da5f25b1ba9
DIFF: https://github.com/llvm/llvm-project/commit/e60b3fcefa62311a93a9f7c8589a1da5f25b1ba9.diff
LOG: [sanitizer] Don't test __pthread_mutex_lock with GLIBC 2.34
Added:
Modified:
compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
Removed:
################################################################################
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
index 2882942964cb6..d5f5e30306f0c 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Linux/pthread_mutex.cpp
@@ -4,7 +4,12 @@
#include <pthread.h>
-#ifdef USE_GLIBC
+#if !defined(__GLIBC_PREREQ)
+#define __GLIBC_PREREQ(a, b) 0
+#endif
+
+#if defined(USE_GLIBC) && !__GLIBC_PREREQ(2, 34)
+// They were removed from GLIBC 2.34
extern "C" int __pthread_mutex_lock(pthread_mutex_t *__mutex);
extern "C" int __pthread_mutex_unlock(pthread_mutex_t *__mutex);
#define LOCK __pthread_mutex_lock
More information about the llvm-commits
mailing list