[llvm-branch-commits] [clang-tools-extra] fef110b - [clangd] Fix building SerializationTests unit test on OpenBSD
Tom Stellard via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Feb 21 13:51:07 PST 2022
Author: Brad Smith
Date: 2022-02-21T13:48:22-08:00
New Revision: fef110bf8b2b3017b92c61de27ed5cd034b6b0e2
URL: https://github.com/llvm/llvm-project/commit/fef110bf8b2b3017b92c61de27ed5cd034b6b0e2
DIFF: https://github.com/llvm/llvm-project/commit/fef110bf8b2b3017b92c61de27ed5cd034b6b0e2.diff
LOG: [clangd] Fix building SerializationTests unit test on OpenBSD
This fixes building the unit tests on OpenBSD. OpenBSD does not support RLIMIT_AS.
Reviewed By: kadircet
Differential Revision: https://reviews.llvm.org/D119989
(cherry picked from commit f374c8ddf2dd4920190cac0ea81e18a74040ddda)
Added:
Modified:
clang-tools-extra/clangd/unittests/SerializationTests.cpp
Removed:
################################################################################
diff --git a/clang-tools-extra/clangd/unittests/SerializationTests.cpp b/clang-tools-extra/clangd/unittests/SerializationTests.cpp
index 290e20a082d66..6070b229f31c7 100644
--- a/clang-tools-extra/clangd/unittests/SerializationTests.cpp
+++ b/clang-tools-extra/clangd/unittests/SerializationTests.cpp
@@ -308,9 +308,9 @@ TEST(SerializationTest, CmdlTest) {
}
}
-// rlimit is part of POSIX.
+// rlimit is part of POSIX. RLIMIT_AS does not exist in OpenBSD.
// Sanitizers use a lot of address space, so we can't apply strict limits.
-#if LLVM_ON_UNIX && !LLVM_ADDRESS_SANITIZER_BUILD && \
+#if LLVM_ON_UNIX && defined(RLIMIT_AS) && !LLVM_ADDRESS_SANITIZER_BUILD && \
!LLVM_MEMORY_SANITIZER_BUILD
class ScopedMemoryLimit {
struct rlimit OriginalLimit;
More information about the llvm-branch-commits
mailing list