[libc-commits] [libc] 6d8ce42 - [libc][obvious] only test FILE on working platforms
Michael Jones via libc-commits
libc-commits at lists.llvm.org
Thu Mar 24 10:19:38 PDT 2022
Author: Michael Jones
Date: 2022-03-24T10:19:34-07:00
New Revision: 6d8ce42825ec70cdf79d74f268e0317d0e68cb59
URL: https://github.com/llvm/llvm-project/commit/6d8ce42825ec70cdf79d74f268e0317d0e68cb59
DIFF: https://github.com/llvm/llvm-project/commit/6d8ce42825ec70cdf79d74f268e0317d0e68cb59.diff
LOG: [libc][obvious] only test FILE on working platforms
The main code for the FILE struct is only enabled on platforms that it
works on, but before this patch the tests were included unconditionally.
Reviewed By: sivachandra, lntue
Differential Revision: https://reviews.llvm.org/D122363
Added:
Modified:
libc/test/src/__support/File/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/test/src/__support/File/CMakeLists.txt b/libc/test/src/__support/File/CMakeLists.txt
index e75da1bd744c3..461a040911c84 100644
--- a/libc/test/src/__support/File/CMakeLists.txt
+++ b/libc/test/src/__support/File/CMakeLists.txt
@@ -1,3 +1,8 @@
+if(NOT (TARGET libc.src.__support.threads.mutex))
+ # Not all platforms have a mutex implementation. If mutex is unvailable,
+ # we just skip everything about files.
+ return()
+endif()
add_libc_unittest(
file_test
More information about the libc-commits
mailing list