[libcxx-commits] [libcxx] [libc++] Reenable codecvt in the dylib. (PR #73679)
Mark de Wever via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 28 23:02:19 PST 2023
mordante wrote:
> ```
> Command Output (stdout):
> --
> # COMPILED WITH
> C:/b/s/w/ir/x/w/llvm_build/./bin/clang-cl.exe C:\b\s\w\ir\x\w\github-mordante-llvm-project\libcxx\test\libcxx\input.output\file.streams\fstreams\ofstream.members\open_wchar_pointer.pass.cpp --driver-mode=g++ --target=x86_64-pc-windows-msvc -fms-runtime-lib=static -nostdinc++ -I C:/b/s/w/ir/x/w/llvm_build/include/c++/v1 -I C:/b/s/w/ir/x/w/llvm_build/include/x86_64-pc-windows-msvc/c++/v1 -I C:/b/s/w/ir/x/w/github-mordante-llvm-project/libcxx/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -llibc++experimental -nostdlib -L C:/b/s/w/ir/x/w/llvm_build/./lib/x86_64-pc-windows-msvc -llibc++ -llibcpmt -o C:\b\s\w\ir\x\w\llvm_build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\libcxx\input.output\file.streams\fstreams\ofstream.members\Output\open_wchar_pointer.pass.cpp.dir\t.tmp.exe
> # executed command: C:/b/s/w/ir/x/w/llvm_build/./bin/clang-cl.exe 'C:\b\s\w\ir\x\w\github-mordante-llvm-project\libcxx\test\libcxx\input.output\file.streams\fstreams\ofstream.members\open_wchar_pointer.pass.cpp' --driver-mode=g++ --target=x86_64-pc-windows-msvc -fms-runtime-lib=static -nostdinc++ -I C:/b/s/w/ir/x/w/llvm_build/include/c++/v1 -I C:/b/s/w/ir/x/w/llvm_build/include/x86_64-pc-windows-msvc/c++/v1 -I C:/b/s/w/ir/x/w/github-mordante-llvm-project/libcxx/test/support -D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_WARNINGS -D_CRT_STDIO_ISO_WIDE_SPECIFIERS -DNOMINMAX -std=c++26 -Werror -Wall -Wctad-maybe-unsupported -Wextra -Wshadow -Wundef -Wunused-template -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-noexcept-type -Wno-atomic-alignment -Wno-reserved-module-identifier -Wdeprecated-copy -Wdeprecated-copy-dtor -Wno-user-defined-literals -Wno-tautological-compare -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Wno-local-type-template-args -Wno-c++11-extensions -Wno-unknown-pragmas -Wno-pass-failed -Wno-mismatched-new-delete -Wno-redundant-move -Wno-self-move -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_ENABLE_EXPERIMENTAL -D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_NONE -Werror=thread-safety -Wuser-defined-warnings -llibc++experimental -nostdlib -L C:/b/s/w/ir/x/w/llvm_build/./lib/x86_64-pc-windows-msvc -llibc++ -llibcpmt -o 'C:\b\s\w\ir\x\w\llvm_build\runtimes\runtimes-x86_64-pc-windows-msvc-bins\test\libcxx\input.output\file.streams\fstreams\ofstream.members\Output\open_wchar_pointer.pass.cpp.dir\t.tmp.exe'
> # .---command stderr------------
> # | In file included from C:\b\s\w\ir\x\w\github-mordante-llvm-project\libcxx\test\libcxx\input.output\file.streams\fstreams\ofstream.members\open_wchar_pointer.pass.cpp:23:
> # | C:/b/s/w/ir/x/w/github-mordante-llvm-project/libcxx/test/support\wide_temp_file.h:23:38: error: no member named 'codecvt_utf8_utf16' in namespace 'std'
> # | 23 | return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> >().from_bytes(get_temp_file_name());
> # | | ~~~~~^
> # | C:/b/s/w/ir/x/w/github-mordante-llvm-project/libcxx/test/support\wide_temp_file.h:23:64: error: expected '(' for function-style cast or type construction
> # | 23 | return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> >().from_bytes(get_temp_file_name());
> # | | ~~~~~~~^
> # | C:/b/s/w/ir/x/w/github-mordante-llvm-project/libcxx/test/support\wide_temp_file.h:23:66: error: expected '(' for function-style cast or type construction
> # | 23 | return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> >().from_bytes(get_temp_file_name());
> # | | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> # | C:/b/s/w/ir/x/w/github-mordante-llvm-project/libcxx/test/support\wide_temp_file.h:23:68: error: expected expression
> # | 23 | return std::wstring_convert<std::codecvt_utf8_utf16<wchar_t> >().from_bytes(get_temp_file_name());
> # | | ^
> # | 4 errors generated.
> # `-----------------------------
> # error: command failed with exit status: 1
>
> --
> ```
>
> Ah, it is still related, see the test failure message.
I had a quick look at these failures and it seems these are Windows only tests.
> @petrhosek and I discussed about the reason why this Fuchsia unrelated breakage wasn't caught by the upstream libcxx bots. It is likely due to the toolchain used when building libcxx and runtimes.
I strongly expect the libc++ toolchain on our Windows CI does not use C++26. This is something we (libc++) need to check.
> In our case, we always use a relatively recent clang we built to build the ToT clang. The ToT clang will then be used to build the runtime.
Based on the failures and that this patch fixed building the dylib I have a very strong impression Fuchsia builds libc++ in C++26 mode. Can you tell what the value of the __cplusplus` macro for your compiler is. (Regardless of that value we need to fix it, but I want to understand why it fails.)
I'll look at an updated fix later today.
https://github.com/llvm/llvm-project/pull/73679
More information about the libcxx-commits
mailing list