Skip to content

Commit 75071b5

Browse files
committed
Make use of RUNTIMES_USE_LIBC to build libcxx
Make use of RUNTIMES_USE_LIBC CMake option to indicate which C library is used to build libcxx. This option was enabled in llvm/llvm-project#147956 instead of hardcoded check for corresponding C library header files.
1 parent 31770e4 commit 75071b5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

arm-software/embedded/arm-runtimes/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@ if(ENABLE_CXX_LIBS)
870870
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=${ENABLE_EXCEPTIONS}
871871
-DLIBCXX_ENABLE_EXCEPTIONS=${ENABLE_EXCEPTIONS}
872872
-DLIBCXX_ENABLE_RTTI=${ENABLE_RTTI}
873+
-DRUNTIMES_USE_LIBC=picolibc
873874
)
874875
if(ENABLE_LIBCXX_TESTS)
875876
# Generate xfails for libxx.
@@ -913,6 +914,7 @@ if(ENABLE_CXX_LIBS)
913914
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=${ENABLE_EXCEPTIONS}
914915
-DLIBCXX_ENABLE_EXCEPTIONS=${ENABLE_EXCEPTIONS}
915916
-DLIBCXX_ENABLE_RTTI=${ENABLE_RTTI}
917+
-DRUNTIMES_USE_LIBC=llvm-libc
916918
)
917919
set(lib_compile_flags "${lib_compile_flags} -D_LIBCPP_PRINT=1")
918920
elseif(C_LIBRARY MATCHES "^newlib")
@@ -926,6 +928,7 @@ if(ENABLE_CXX_LIBS)
926928
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=${ENABLE_EXCEPTIONS}
927929
-DLIBCXX_ENABLE_EXCEPTIONS=${ENABLE_EXCEPTIONS}
928930
-DLIBCXX_ENABLE_RTTI=${ENABLE_RTTI}
931+
-DRUNTIMES_USE_LIBC=newlib
929932
)
930933

931934
if(C_LIBRARY STREQUAL newlib-nano)

0 commit comments

Comments
 (0)