Skip to content

Commit f374c8d

Browse files
committed
[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
1 parent 7db1d4d commit f374c8d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang-tools-extra/clangd/unittests/SerializationTests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,9 @@ TEST(SerializationTest, CmdlTest) {
308308
}
309309
}
310310

311-
// rlimit is part of POSIX.
311+
// rlimit is part of POSIX. RLIMIT_AS does not exist in OpenBSD.
312312
// Sanitizers use a lot of address space, so we can't apply strict limits.
313-
#if LLVM_ON_UNIX && !LLVM_ADDRESS_SANITIZER_BUILD && \
313+
#if LLVM_ON_UNIX && defined(RLIMIT_AS) && !LLVM_ADDRESS_SANITIZER_BUILD && \
314314
!LLVM_MEMORY_SANITIZER_BUILD
315315
class ScopedMemoryLimit {
316316
struct rlimit OriginalLimit;

0 commit comments

Comments
 (0)