[libcxx-commits] [libcxx] [libcxx] Do not define _CRT_STDIO_ISO_WIDE_SPECIFIERS on Windows (PR #238233)

via libcxx-commits libcxx-commits at lists.llvm.org
Mon Nov 2 23:06:38 PST 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libcxx

Author: Petr Hosek (petrhosek)

<details>
<summary>Changes</summary>

Most C++ projects on Windows (including LLVM) do not define
_CRT_STDIO_ISO_WIDE_SPECIFIERS, which causes linker mismatches when
linking against a static libc++ built with that macro defined.

#<!-- -->238229

---
Full diff: https://github.com/llvm/llvm-project/pull/238233.diff


1 Files Affected:

- (modified) libcxx/CMakeLists.txt (+1-4) 


``````````diff
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 8841f5d07aaf6c..16002678ba7d53 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -727,10 +727,7 @@ function(cxx_add_windows_flags target)
                                  # Don't warn on the use of "deprecated"
                                  # "insecure" functions which are standards
                                  # specified.
-                                 _CRT_SECURE_NO_WARNINGS
-                                 # Use the ISO conforming behaviour for conversion
-                                 # in printf, scanf.
-                                 _CRT_STDIO_ISO_WIDE_SPECIFIERS)
+                                 _CRT_SECURE_NO_WARNINGS)
   endif()
 endfunction()
 

``````````

</details>


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


More information about the libcxx-commits mailing list