[libcxx-commits] [libcxx] [libc++] Redefine Fuchsia locale base support on top of the new API (PR #122489)

Daniel Thornburgh via libcxx-commits libcxx-commits at lists.llvm.org
Fri Jan 10 11:32:03 PST 2025


mysterymath wrote:

It looks like this still results in a different build failure:

https://ci.chromium.org/ui/p/fuchsia/builders/toolchain.ci.shadow/clang-linux-x64/b8726107014473846721/overview

```
FAILED: libcxx/src/CMakeFiles/cxx_shared.dir/vector.cpp.obj 
/b/s/w/ir/x/w/llvm_build/./bin/clang++ --target=x86_64-unknown-fuchsia --sysroot=/b/s/w/ir/x/w/sdk/arch/x64/sysroot -DLIBCXX_BUILDING_LIBCXXABI -DLIBC_NAMESPACE=__llvm_libc_common_utils -D_DEBUG -D_GLIBCXX_ASSERTIONS -D_LIBCPP_BUILDING_LIBRARY -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -D_LIBCPP_REMOVE_TRANSITIVE_INCLUDES -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/b/s/w/ir/x/w/github-ldionne-llvm-project/libcxx/src -I/b/s/w/ir/x/w/llvm_build/include/x86_64-unknown-fuchsia/c++/v1 -I/b/s/w/ir/x/w/llvm_build/include/c++/v1 -I/b/s/w/ir/x/w/github-ldionne-llvm-project/libcxxabi/include -I/b/s/w/ir/x/w/github-ldionne-llvm-project/runtimes/cmake/Modules/../../../libc --target=x86_64-unknown-fuchsia -I/b/s/w/ir/x/w/sdk/pkg/sync/include -I/b/s/w/ir/x/w/sdk/pkg/fdio/include -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wmisleading-indentation -Wctad-maybe-unsupported -ffunction-sections -fdata-sections -ffile-prefix-map=/b/s/w/ir/x/w/llvm_build/runtimes/runtimes-x86_64-unknown-fuchsia-bins=../../../github-ldionne-llvm-project -ffile-prefix-map=/b/s/w/ir/x/w/github-ldionne-llvm-project/= -no-canonical-prefixes -O2 -g -DNDEBUG -std=c++2b -fPIC -UNDEBUG -faligned-allocation -nostdinc++ -fvisibility-inlines-hidden -fvisibility=hidden -fsized-deallocation -Wall -Wextra -Wnewline-eof -Wshadow -Wwrite-strings -Wno-unused-parameter -Wno-long-long -Werror=return-type -Wextra-semi -Wundef -Wunused-template -Wformat-nonliteral -Wzero-length-array -Wdeprecated-redundant-constexpr-static-def -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override -Wno-error -MD -MT libcxx/src/CMakeFiles/cxx_shared.dir/vector.cpp.obj -MF libcxx/src/CMakeFiles/cxx_shared.dir/vector.cpp.obj.d -o libcxx/src/CMakeFiles/cxx_shared.dir/vector.cpp.obj -c /b/s/w/ir/x/w/github-ldionne-llvm-project/libcxx/src/vector.cpp
In file included from /b/s/w/ir/x/w/github-ldionne-llvm-project/libcxx/src/vector.cpp:9:
In file included from /b/s/w/ir/x/w/llvm_build/include/c++/v1/vector:326:
In file included from /b/s/w/ir/x/w/llvm_build/include/c++/v1/__vector/vector_bool_formatter.h:15:
In file included from /b/s/w/ir/x/w/llvm_build/include/c++/v1/__format/formatter_bool.h:19:
In file included from /b/s/w/ir/x/w/llvm_build/include/c++/v1/__format/formatter_integral.h:36:
In file included from /b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale:14:
In file included from /b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/locale_base_api.h:103:
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:24:72: error: no member named 'uselocale' in the global namespace
   24 |   _LIBCPP_HIDE_FROM_ABI __locale_guard(locale_t& __loc) : __old_loc_(::uselocale(__loc)) {}
      |                                                                      ~~^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:28:9: error: no type named 'uselocale' in the global namespace
   28 |       ::uselocale(__old_loc_);
      |       ~~^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:28:19: warning: declaration shadows a field of 'std::__locale::__locale_guard' [-Wshadow]
   28 |       ::uselocale(__old_loc_);
      |                   ^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:31:12: note: previous declaration is here
   31 |   locale_t __old_loc_;
      |            ^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:43:10: error: no member named 'newlocale' in the global namespace; did you mean '__newlocale'?
   43 |   return ::newlocale(__category_mask, __name, __loc);
      |          ^~~~~~~~~~~
      |          __newlocale
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:42:41: note: '__newlocale' declared here
   42 | inline _LIBCPP_HIDE_FROM_ABI __locale_t __newlocale(int __category_mask, const char* __name, __locale_t __loc) {
      |                                         ^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:46:70: error: no type named 'freelocale' in the global namespace
   46 | inline _LIBCPP_HIDE_FROM_ABI void __freelocale(__locale_t __loc) { ::freelocale(__loc); }
      |                                                                    ~~^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:46:81: warning: declaration shadows a local variable [-Wshadow]
   46 | inline _LIBCPP_HIDE_FROM_ABI void __freelocale(__locale_t __loc) { ::freelocale(__loc); }
      |                                                                                 ^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:46:59: note: previous declaration is here
   46 | inline _LIBCPP_HIDE_FROM_ABI void __freelocale(__locale_t __loc) { ::freelocale(__loc); }
      |                                                           ^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:48:30: error: unknown type name 'lconv'
   48 | inline _LIBCPP_HIDE_FROM_ABI lconv* __localeconv(__locale_t& __loc) {
      |                              ^
/b/s/w/ir/x/w/llvm_build/include/c++/v1/__locale_dir/support/fuchsia.h:50:15: error: no member named 'localeconv' in namespace 'std'
   50 |   return std::localeconv();
      |          ~~~~~^
2 warnings and 6 errors generated.
```

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


More information about the libcxx-commits mailing list