[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:26:48 PDT 2024
    
    
  
https://github.com/aaryanshukla created https://github.com/llvm/llvm-project/pull/94678
- addressed https://github.com/llvm/llvm-project/pull/94317#issuecomment-2153103129
- added conditional in cmake file for exit_handler object library
>From 8e028fc04fbdc072cce137658cf85da6a1de2795 Mon Sep 17 00:00:00 2001
From: Aaryan Shukla <aaryanshukla at google.com>
Date: Thu, 6 Jun 2024 20:23:02 +0000
Subject: [PATCH] [libc] fixed target issue with exit_handler
- addressed https://github.com/llvm/llvm-project/pull/94317#issuecomment-2153103129
- added conditional in cmake file for exit_handler object library
---
 libc/src/stdlib/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)
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
    
    
More information about the libc-commits
mailing list