[libc-commits] [libc] [libc] fixed target issue with exit_handler (PR #94678)

via libc-commits libc-commits at lists.llvm.org
Thu Jun 6 13:27:21 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: None (aaryanshukla)

<details>
<summary>Changes</summary>

- addressed https://github.com/llvm/llvm-project/pull/94317#issuecomment-2153103129
- added conditional in cmake file for exit_handler object library

---
Full diff: https://github.com/llvm/llvm-project/pull/94678.diff


1 Files Affected:

- (modified) libc/src/stdlib/CMakeLists.txt (+4) 


``````````diff
diff --git a/libc/src/stdlib/CMakeLists.txt b/libc/src/stdlib/CMakeLists.txt
index 219c85dda6757..f0091ad367c0a 100644
--- a/libc/src/stdlib/CMakeLists.txt
+++ b/libc/src/stdlib/CMakeLists.txt
@@ -416,6 +416,9 @@ add_entrypoint_object(
     libc.src.__support.OSUtil.osutil
 )
 
+# TODO: Move all exit functions to linux specific 
+
+if (TARGET libc.src.__support.threads.mutex)
 add_object_library(
   exit_handler
   SRCS
@@ -432,6 +435,7 @@ add_object_library(
     libc.src.__support.fixedvector
     libc.src.__support.threads.mutex
 )
+endif()
 
 add_entrypoint_object(
   atexit

``````````

</details>


https://github.com/llvm/llvm-project/pull/94678


More information about the libc-commits mailing list