[libc-commits] [libc] f0e608d - [libc] Add linux threads targets only if __support/OSUtil targets are available.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Wed Jun 15 00:19:31 PDT 2022
Author: Siva Chandra Reddy
Date: 2022-06-15T07:18:57Z
New Revision: f0e608de27b3d568000046eebf3712ab542979d6
URL: https://github.com/llvm/llvm-project/commit/f0e608de27b3d568000046eebf3712ab542979d6
DIFF: https://github.com/llvm/llvm-project/commit/f0e608de27b3d568000046eebf3712ab542979d6.diff
LOG: [libc] Add linux threads targets only if __support/OSUtil targets are available.
Added:
Modified:
libc/src/__support/CMakeLists.txt
libc/src/__support/threads/linux/CMakeLists.txt
Removed:
################################################################################
diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index 284d4ae5ca65..24c637218723 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -60,10 +60,11 @@ add_header_library(
arg_list.h
)
-# Thread support is used by other support libraries. So, we add the "threads"
-# before other directories.
+add_subdirectory(FPUtil)
+add_subdirectory(OSUtil)
+
+# Thread support is used by other "File". So, we add the "threads"
+# before "File".
add_subdirectory(threads)
add_subdirectory(File)
-add_subdirectory(FPUtil)
-add_subdirectory(OSUtil)
diff --git a/libc/src/__support/threads/linux/CMakeLists.txt b/libc/src/__support/threads/linux/CMakeLists.txt
index 558cf14a9da1..8b298025da34 100644
--- a/libc/src/__support/threads/linux/CMakeLists.txt
+++ b/libc/src/__support/threads/linux/CMakeLists.txt
@@ -4,6 +4,10 @@ add_header_library(
futex_word.h
)
+if(NOT TARGET libc.src.__support.OSUtil.osutil)
+ return()
+endif()
+
add_header_library(
mutex
HDRS
More information about the libc-commits
mailing list