File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
cmake/preload/toolchains/util Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -44,8 +44,11 @@ endforeach()
4444list (APPEND CMAKE_TRY_COMPILE_PLATFORM_VARIABLES PICO_CLIB)
4545
4646set (_PICO_CLIB_PATH "${PICO_COMPILER_DIR} /../lib/clang-runtimes/arm-none-eabi" )
47- if (PICO_CLIB STREQUAL "" )
48- # use default from above
47+ if (PICO_CLIB STREQUAL "" OR PICO_CLIB STREQUAL "newlib" )
48+ # newlib is 1st class choice
49+ if (EXISTS "${PICO_COMPILER_DIR} /../lib/clang-runtimes/newlib/arm-none-eabi" )
50+ set (_PICO_CLIB_PATH "${PICO_COMPILER_DIR} /../lib/clang-runtimes/newlib/arm-none-eabi" )
51+ endif ()
4952elseif (PICO_CLIB STREQUAL "llvm_libc" )
5053 if (EXISTS "${PICO_COMPILER_DIR} /../lib/clang-runtimes/llvmlibc/arm-none-eabi" )
5154 set (_PICO_CLIB_PATH "${PICO_COMPILER_DIR} /../lib/clang-runtimes/llvmlibc/arm-none-eabi" )
@@ -54,10 +57,6 @@ elseif(PICO_CLIB STREQUAL "picolibc")
5457 if (EXISTS "${PICO_COMPILER_DIR} /../lib/clang-runtimes/picolibc/arm-none-eabi" )
5558 set (_PICO_CLIB_PATH "${PICO_COMPILER_DIR} /../lib/clang-runtimes/picolibc/arm-none-eabi" )
5659 endif ()
57- elseif (PICO_CLIB STREQUAL "newlib" )
58- if (EXISTS "${PICO_COMPILER_DIR} /../lib/clang-runtimes/newlib/arm-none-eabi" )
59- set (_PICO_CLIB_PATH "${PICO_COMPILER_DIR} /../lib/clang-runtimes/newlib/arm-none-eabi" )
60- endif ()
6160else ()
6261 message (FATAL_ERROR "PICO_CLIB must be one of newlib, picolib, llvm_libc or empty (but is '${PICO_CLIB} ')" )
6362endif ()
You can’t perform that action at this time.
0 commit comments