@@ -62,7 +62,10 @@ foreach (FLOAT_TYPE IN LISTS FLOAT_TYPES)
6262 pico_set_float_implementation (custom_float_funcs_test_${FLOAT_TYPE} ${FLOAT_TYPE} )
6363 target_link_libraries (custom_float_funcs_test_${FLOAT_TYPE} PRIVATE pico_stdlib )
6464 pico_add_extra_outputs (custom_float_funcs_test_${FLOAT_TYPE} )
65- pico_set_printf_implementation (custom_float_funcs_test_${FLOAT_TYPE} compiler )
65+ if (NOT PICO_CLIB STREQUAL "llvm_libc" )
66+ # raw compiler printf on llvm_libc doesn't currently have floating point
67+ pico_set_printf_implementation (custom_float_funcs_test_${FLOAT_TYPE} compiler )
68+ endif ()
6669 if (PICO_C_COMPILER_IS_GNU)
6770 target_compile_options (custom_float_funcs_test_${FLOAT_TYPE} PRIVATE -Wno-analyzer-use-of-uninitialized-value )
6871 endif ()
@@ -79,7 +82,10 @@ foreach (FLOAT_TYPE IN LISTS FLOAT_TYPES)
7982 target_link_libraries (float_benchmark_${FLOAT_TYPE} PRIVATE pico_stdlib m )
8083 pico_add_extra_outputs (float_benchmark_${FLOAT_TYPE} )
8184 target_compile_definitions (float_benchmark_${FLOAT_TYPE} PRIVATE PICO_FLOAT_IN_RAM=1 )
82- pico_set_printf_implementation (float_benchmark_${FLOAT_TYPE} compiler )
85+ if (NOT PICO_CLIB STREQUAL "llvm_libc" )
86+ # raw compiler printf on llvm_libc doesn't currently have floating point
87+ pico_set_printf_implementation (float_benchmark_${FLOAT_TYPE} compiler )
88+ endif ()
8389 pico_set_binary_type (float_benchmark_${FLOAT_TYPE} copy_to_ram )
8490endforeach ()
8591
@@ -117,7 +123,10 @@ foreach (DOUBLE_TYPE IN LISTS DOUBLE_TYPES)
117123 pico_set_double_implementation (custom_double_funcs_test_${DOUBLE_TYPE} ${DOUBLE_TYPE} )
118124 target_link_libraries (custom_double_funcs_test_${DOUBLE_TYPE} PRIVATE pico_stdlib )
119125 pico_add_extra_outputs (custom_double_funcs_test_${DOUBLE_TYPE} )
120- pico_set_printf_implementation (custom_double_funcs_test_${DOUBLE_TYPE} compiler )
126+ if (NOT PICO_CLIB STREQUAL "llvm_libc" )
127+ # raw compiler printf on llvm_libc doesn't currently have floating point
128+ pico_set_printf_implementation (custom_double_funcs_test_${DOUBLE_TYPE} compiler )
129+ endif ()
121130
122131 if (PICO_C_COMPILER_IS_CLANG)
123132 # llvm by default will treat our out of range float->int conversions as undefined behavior
@@ -133,7 +142,10 @@ foreach (DOUBLE_TYPE IN LISTS DOUBLE_TYPES)
133142 target_link_libraries (double_benchmark_${DOUBLE_TYPE} PRIVATE pico_stdlib m )
134143 pico_add_extra_outputs (double_benchmark_${DOUBLE_TYPE} )
135144 target_compile_definitions (double_benchmark_${DOUBLE_TYPE} PRIVATE PICO_DOUBLE_IN_RAM=1 )
136- pico_set_printf_implementation (double_benchmark_${DOUBLE_TYPE} compiler )
145+ if (NOT PICO_CLIB STREQUAL "llvm_libc" )
146+ # raw compiler printf on llvm_libc doesn't currently have floating point
147+ pico_set_printf_implementation (double_benchmark_${DOUBLE_TYPE} compiler )
148+ endif ()
137149 pico_set_binary_type (double_benchmark_${DOUBLE_TYPE} copy_to_ram )
138150endforeach ()
139151
0 commit comments