[libcxx-commits] [libcxx] a795dfa - [libcxx] Fix indirect includes for nolocale (#229601)
via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Oct 7 15:59:51 PDT 2026
Author: Michael Jones
Date: 2026-10-07T15:59:44-07:00
New Revision: a795dfacfbc9f0146408c66d0c92ade67372d27b
URL: https://github.com/llvm/llvm-project/commit/a795dfacfbc9f0146408c66d0c92ade67372d27b
DIFF: https://github.com/llvm/llvm-project/commit/a795dfacfbc9f0146408c66d0c92ade67372d27b.diff
LOG: [libcxx] Fix indirect includes for nolocale (#229601)
The indirect include tests for several headers were failing when turning
on filesystem for LLVM-libc. This turned out to be because the nolocale
header was leaking ctime and other headers when building outside of
library mode. This PR just moves all the includes under the library
guard.
Added:
Modified:
libcxx/include/__locale_dir/support/no_locale/characters.h
libcxx/test/std/depr/depr.c.headers/signal_h.compile.pass.cpp
libcxx/test/std/language.support/support.runtime/csignal.pass.cpp
Removed:
################################################################################
diff --git a/libcxx/include/__locale_dir/support/no_locale/characters.h b/libcxx/include/__locale_dir/support/no_locale/characters.h
index ffe66979169146..56d1bfdf2ab0f3 100644
--- a/libcxx/include/__locale_dir/support/no_locale/characters.h
+++ b/libcxx/include/__locale_dir/support/no_locale/characters.h
@@ -10,22 +10,22 @@
#define _LIBCPP___LOCALE_DIR_SUPPORT_NO_LOCALE_CHARACTERS_H
#include <__config>
-#include <__cstddef/size_t.h>
-#include <cctype>
-#include <cstdlib>
-#include <cstring>
-#include <ctime>
-#if _LIBCPP_HAS_WIDE_CHARACTERS
-# include <cwchar>
-# include <cwctype>
-#endif
-
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
# pragma GCC system_header
#endif
#if defined(_LIBCPP_BUILDING_LIBRARY)
+# include <__cstddef/size_t.h>
+# include <cctype>
+# include <cstdlib>
+# include <cstring>
+# include <ctime>
+# if _LIBCPP_HAS_WIDE_CHARACTERS
+# include <cwchar>
+# include <cwctype>
+# endif
+
_LIBCPP_BEGIN_NAMESPACE_STD
namespace __locale {
diff --git a/libcxx/test/std/depr/depr.c.headers/signal_h.compile.pass.cpp b/libcxx/test/std/depr/depr.c.headers/signal_h.compile.pass.cpp
index 2f18dea203cffb..ace2eea17225a0 100644
--- a/libcxx/test/std/depr/depr.c.headers/signal_h.compile.pass.cpp
+++ b/libcxx/test/std/depr/depr.c.headers/signal_h.compile.pass.cpp
@@ -6,9 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// Static assertion failure.
-// XFAIL: LLVM-LIBC-FIXME
-
// test <signal.h>
#include <signal.h>
diff --git a/libcxx/test/std/language.support/support.runtime/csignal.pass.cpp b/libcxx/test/std/language.support/support.runtime/csignal.pass.cpp
index 9273a5de7edf61..4548d3417ec430 100644
--- a/libcxx/test/std/language.support/support.runtime/csignal.pass.cpp
+++ b/libcxx/test/std/language.support/support.runtime/csignal.pass.cpp
@@ -6,9 +6,6 @@
//
//===----------------------------------------------------------------------===//
-// Static assertion failure.
-// XFAIL: LLVM-LIBC-FIXME
-
// test <csignal>
#include <csignal>
More information about the libcxx-commits
mailing list