Skip to content

Commit 139bced

Browse files
authored
Define _LIBCPP_HAS_MUSL_LIBC in libcxx build (#17022)
This allows us to remove `include/compat/xlocale.h` which it seems was added to support libcxx, but libcxx already has support for musl internally when this macro is defined.
1 parent 08672ec commit 139bced

File tree

5 files changed

+4
-45
lines changed

5 files changed

+4
-45
lines changed

system/include/compat/xlocale.h

Lines changed: 0 additions & 19 deletions
This file was deleted.

system/lib/libc/compat/strtol_l.c

Lines changed: 0 additions & 22 deletions
This file was deleted.

system/lib/libcxx/include/__config_site

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
// data and other nice fixes.
33
#define _LIBCPP_ABI_VERSION 2
44
#define _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS
5+
#define _LIBCPP_HAS_MUSL_LIBC

system/lib/libcxx/include/__locale

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,7 @@
3434
# include <__support/newlib/xlocale.h>
3535
#elif defined(__OpenBSD__)
3636
# include <__support/openbsd/xlocale.h>
37-
#elif (defined(__APPLE__) || defined(__FreeBSD__) \
38-
|| defined(__EMSCRIPTEN__) || defined(__IBMCPP__))
37+
#elif (defined(__APPLE__) || defined(__FreeBSD__) || defined(__IBMCPP__))
3938
# include <xlocale.h>
4039
#elif defined(__Fuchsia__)
4140
# include <__support/fuchsia/xlocale.h>

system/lib/libcxx/src/include/config_elast.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
// No _LIBCPP_ELAST needed on Fuchsia
3030
#elif defined(__wasi__)
3131
// No _LIBCPP_ELAST needed on WASI
32+
#elif defined(__EMSCRIPTEN__)
33+
// No _LIBCPP_ELAST needed on Emscripten
3234
#elif defined(__linux__) || defined(_LIBCPP_HAS_MUSL_LIBC)
3335
#define _LIBCPP_ELAST 4095
3436
#elif defined(__APPLE__)
3537
// No _LIBCPP_ELAST needed on Apple
36-
#elif defined(__EMSCRIPTEN__)
37-
// No _LIBCPP_ELAST needed on Emscripten
3838
#elif defined(__sun__)
3939
#define _LIBCPP_ELAST ESTALE
4040
#elif defined(__MVS__)

0 commit comments

Comments
 (0)