[libcxx-commits] [PATCH] D137130: [libc++][Android] Hide locale Lit features for Bionic
Ryan Prichard via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Oct 31 15:54:26 PDT 2022
rprichard created this revision.
rprichard added reviewers: ldionne, danalbert.
Herald added subscribers: danielkiss, arichardson.
Herald added a project: All.
rprichard requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Bionic's locale support is simplistic: it only recognizes two locales,
"C" (aka "POSIX") and "C.UTF-8" (aka "en_US.UTF-8"). The locale mode
determines the MB_CUR_MAX, but there is no true locale stuff (e.g.
number formatting). Treat Bionic as if it lacks locales.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D137130
Files:
libcxx/utils/libcxx/test/dsl.py
Index: libcxx/utils/libcxx/test/dsl.py
===================================================================
--- libcxx/utils/libcxx/test/dsl.py
+++ libcxx/utils/libcxx/test/dsl.py
@@ -245,9 +245,14 @@
%{exec} -- this means that the command may be executed on a remote host
depending on the %{exec} substitution.
"""
+ # Bionic's locale support is simplistic: it only recognizes two locales, "C"
+ # (aka "POSIX") and "C.UTF-8" (aka "en_US.UTF-8"). The locale mode determines
+ # the MB_CUR_MAX, but there is no true locale stuff (e.g. number formatting).
+ # Treat Bionic as if it lacks locales.
program = """
#include <stddef.h>
- #if defined(_LIBCPP_HAS_NO_LOCALIZATION)
+ #include <stdlib.h>
+ #if defined(_LIBCPP_HAS_NO_LOCALIZATION) || defined(__BIONIC__)
int main(int, char**) { return 1; }
#else
#include <locale.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D137130.472169.patch
Type: text/x-patch
Size: 871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20221031/0dbf6b2e/attachment-0001.bin>
More information about the libcxx-commits
mailing list