[libc-commits] [libc] [libc] Fix setjmp build order. (PR #144917)

via libc-commits libc-commits at lists.llvm.org
Thu Jun 19 08:45:42 PDT 2025


https://github.com/lntue created https://github.com/llvm/llvm-project/pull/144917

Fix build order issue from https://github.com/llvm/llvm-project/pull/139555.

>From 735ac72889ac7a5519e96a7d9adc8c09c4a86091 Mon Sep 17 00:00:00 2001
From: Tue Ly <lntue.h at gmail.com>
Date: Thu, 19 Jun 2025 15:43:56 +0000
Subject: [PATCH] [libc] Fix setjmp build order.

---
 libc/src/setjmp/CMakeLists.txt | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/libc/src/setjmp/CMakeLists.txt b/libc/src/setjmp/CMakeLists.txt
index 50c827254da65..8b8e74f0955eb 100644
--- a/libc/src/setjmp/CMakeLists.txt
+++ b/libc/src/setjmp/CMakeLists.txt
@@ -1,7 +1,4 @@
 # Process architecture-specific subdirectory FIRST to avoid missing targets.
-if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
-  add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
-endif()
 
 # Then process OS-specific subdirectory
 if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
@@ -14,6 +11,10 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
   )
 endif()
 
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
+  add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
+endif()
+
 add_entrypoint_object(
   setjmp
   ALIAS



More information about the libc-commits mailing list