[libc-commits] [PATCH] D122363: [libc][obvious] only test FILE on working platforms
Michael Jones via Phabricator via libc-commits
libc-commits at lists.llvm.org
Wed Mar 23 17:02:42 PDT 2022
michaelrj created this revision.
michaelrj added reviewers: sivachandra, lntue.
Herald added subscribers: libc-commits, ecnelises, tschuett, mgorny.
Herald added projects: libc-project, All.
michaelrj requested review of this revision.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D122363
Files:
libc/test/src/__support/File/CMakeLists.txt
Index: libc/test/src/__support/File/CMakeLists.txt
===================================================================
--- libc/test/src/__support/File/CMakeLists.txt
+++ 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122363.417789.patch
Type: text/x-patch
Size: 456 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20220324/01bafafc/attachment.bin>
More information about the libc-commits
mailing list