[llvm] [libc] Refactor scanf reader to match printf (PR #66023)

via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 22 12:44:22 PDT 2023


================
@@ -220,6 +220,20 @@ add_libc_test(
     libc.src.stdio.vprintf
 )
 
+
+if(LLVM_LIBC_FULL_BUILD)
+  # In fullbuild mode, fscanf's tests use the internal FILE for other functions.
+  list(APPEND fscanf_test_deps
+       libc.src.stdio.fclose
+       libc.src.stdio.ferror
+       libc.src.stdio.fopen
+       libc.src.stdio.fwrite
+  )
+else()
+# Else in overlay mode they use the system's FILE.
+ set(fscanf_test_copts "-DLIBC_COPT_SCANF_USE_SYSTEM_FILE")
----------------
michaelrj-google wrote:

done. I renamed the flag in cmake to `use_system_file`, though you can change that in your printf config patch.

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


More information about the llvm-commits mailing list