[libc-commits] [libc] [libc] Add printf error handling (with fixes) (PR #166382)

Michael Jones via libc-commits libc-commits at lists.llvm.org
Tue Nov 4 10:26:47 PST 2025


================
@@ -32,6 +32,17 @@ if(printf_config_copts)
   list(PREPEND printf_config_copts "COMPILE_OPTIONS")
 endif()
 
+if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/${LIBC_TARGET_OS})
+  add_subdirectory(${LIBC_TARGET_OS})
+else()
+  add_subdirectory(generic)
+endif()
+
+set(target_error_mapper libc.src.stdio.printf_core.${LIBC_TARGET_OS}.error_mapper)
+if(NOT TARGET ${target_error_converter})
----------------
michaelrj-google wrote:

this needs to be fixed. Was preventing the tests from running.
```suggestion
if(NOT TARGET ${target_error_mapper})
```

https://github.com/llvm/llvm-project/pull/166382


More information about the libc-commits mailing list