[libcxx-commits] [libcxx] [libc++] Reenable codecvt in the dylib. (PR #73679)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 28 13:29:38 PST 2023


zeroomega 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.

@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.

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.

In upstream llvm bots, for runtime builds, it usually uses a last stable release clang to build the ToT runtime directly to reduce build time. In this case, the bug like this won't be caught until there is a new llvm stable release. I think for libcxx, at least there should be a few bots configured in a way that bots need to use ToT clang to build libcxx and corresponding runtimes for the host platform. Otherwise, breakage like this will be hide in dark.

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


More information about the libcxx-commits mailing list