Skip to content

Commit 45e8a54

Browse files
committed
Process AArch64 first before target os
1 parent b7454a0 commit 45e8a54

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

libc/src/setjmp/CMakeLists.txt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# Process architecture-specific subdirectory FIRST to avoid missing targets.
2+
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
3+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
4+
endif()
5+
6+
# Then process OS-specific subdirectory
17
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
28
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
39
add_object_library(
@@ -8,10 +14,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
814
)
915
endif()
1016

11-
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
12-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_ARCHITECTURE})
13-
endif()
14-
17+
message(STATUS "Target arch is ${LIBC_TARGET_ARCHITECTURE}")
1518

1619
add_entrypoint_object(
1720
setjmp
@@ -44,4 +47,4 @@ if (TARGET libc.src.setjmp.sigsetjmp_epilogue)
4447
DEPENDS
4548
.${LIBC_TARGET_ARCHITECTURE}.sigsetjmp
4649
)
47-
endif()
50+
endif()

0 commit comments

Comments
 (0)