Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++] Refactor the configuration macros to being always defined #112094

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

philnik777
Copy link
Contributor

This is a follow-up to #89178. This updates the <__config_site> macros.

Copy link

github-actions bot commented Oct 12, 2024

⚠️ Python code formatter, darker found issues in your code. ⚠️

You can test this locally with the following command:
darker --check --diff -r 9f24c145494ee238e65e25205a4dcb4451f009ae...131d843a7408c52701c473803535c97f2d7aff1d libcxx/test/libcxx/feature_test_macro/ftm_metadata.sh.py libcxx/test/libcxx/feature_test_macro/version_header.sh.py libcxx/test/libcxx/feature_test_macro/version_header_implementation.sh.py libcxx/utils/generate_feature_test_macro_components.py libcxx/utils/libcxx/header_information.py libcxx/utils/libcxx/test/dsl.py libcxx/utils/libcxx/test/features.py
View the diff from darker here.
--- utils/libcxx/test/features.py	2024-10-16 09:09:39.000000 +0000
+++ utils/libcxx/test/features.py	2024-10-16 09:13:14.332783 +0000
@@ -229,11 +229,12 @@
     ),
     # Check for a Windows UCRT bug (fixed in UCRT/Windows 10.0.20348.0):
     # https://developercommunity.visualstudio.com/t/utf-8-locales-break-ctype-functions-for-wchar-type/1653678
     Feature(
         name="win32-broken-utf8-wchar-ctype",
-        when=lambda cfg: not "_LIBCPP_HAS_LOCALIZATION" in compilerMacros(cfg) or compilerMacros(cfg)["_LIBCPP_HAS_LOCALIZATION"]
+        when=lambda cfg: not "_LIBCPP_HAS_LOCALIZATION" in compilerMacros(cfg)
+        or compilerMacros(cfg)["_LIBCPP_HAS_LOCALIZATION"]
         and "_WIN32" in compilerMacros(cfg)
         and not programSucceeds(
             cfg,
             """
             #include <locale.h>
@@ -285,11 +286,12 @@
     ),
     # Check for Glibc < 2.27, where the ru_RU.UTF-8 locale had
     # mon_decimal_point == ".", which our tests don't handle.
     Feature(
         name="glibc-old-ru_RU-decimal-point",
-        when=lambda cfg: not "_LIBCPP_HAS_LOCALIZATION" in compilerMacros(cfg) or compilerMacros(cfg)["_LIBCPP_HAS_LOCALIZATION"]
+        when=lambda cfg: not "_LIBCPP_HAS_LOCALIZATION" in compilerMacros(cfg)
+        or compilerMacros(cfg)["_LIBCPP_HAS_LOCALIZATION"]
         and not programSucceeds(
             cfg,
             """
             #include <locale.h>
             #include <string.h>
@@ -400,11 +402,12 @@
 }
 for macro, feature in inverted_macros.items():
     DEFAULT_FEATURES.append(
         Feature(
             name=feature,
-            when=lambda cfg, m=macro: m in compilerMacros(cfg) and compilerMacros(cfg)[m] == "0"
+            when=lambda cfg, m=macro: m in compilerMacros(cfg)
+            and compilerMacros(cfg)[m] == "0",
         )
     )
 
 # Mapping from canonical locale names (used in the tests) to possible locale
 # names on various systems. Each locale is considered supported if any of the

Copy link

github-actions bot commented Oct 12, 2024

✅ With the latest revision this PR passed the C/C++ code formatter.

@philnik777 philnik777 marked this pull request as ready for review October 18, 2024 15:49
@philnik777 philnik777 requested a review from a team as a code owner October 18, 2024 15:49
@llvmbot llvmbot added cmake Build system in general and CMake in particular libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. labels Oct 18, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Oct 18, 2024

@llvm/pr-subscribers-libcxx

Author: Nikolas Klauser (philnik777)

Changes

This is a follow-up to #89178. This updates the &lt;__config_site&gt; macros.


Patch is 335.08 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/112094.diff

210 Files Affected:

  • (modified) libcxx/CMakeLists.txt (+11-11)
  • (modified) libcxx/docs/DesignDocs/ThreadingSupportAPI.rst (+3-3)
  • (modified) libcxx/include/__algorithm/find.h (+3-3)
  • (modified) libcxx/include/__algorithm/lexicographical_compare.h (+3-3)
  • (modified) libcxx/include/__algorithm/sort.h (+2-2)
  • (modified) libcxx/include/__atomic/aliases.h (+1-1)
  • (modified) libcxx/include/__atomic/atomic_sync.h (+3-3)
  • (modified) libcxx/include/__chrono/convert_to_tm.h (+1-2)
  • (modified) libcxx/include/__chrono/formatter.h (+11-13)
  • (modified) libcxx/include/__chrono/high_resolution_clock.h (+1-1)
  • (modified) libcxx/include/__chrono/ostream.h (+4-4)
  • (modified) libcxx/include/__chrono/parser_std_format_spec.h (+2-2)
  • (modified) libcxx/include/__chrono/statically_widen.h (+3-3)
  • (modified) libcxx/include/__chrono/steady_clock.h (+1-1)
  • (modified) libcxx/include/__chrono/time_zone.h (+3-4)
  • (modified) libcxx/include/__chrono/time_zone_link.h (+3-3)
  • (modified) libcxx/include/__chrono/tzdb.h (+3-4)
  • (modified) libcxx/include/__chrono/tzdb_list.h (+3-4)
  • (modified) libcxx/include/__chrono/zoned_time.h (+3-4)
  • (modified) libcxx/include/__condition_variable/condition_variable.h (+4-4)
  • (modified) libcxx/include/__config (+11-14)
  • (modified) libcxx/include/__config_site.in (+11-11)
  • (modified) libcxx/include/__configuration/availability.h (+5-7)
  • (modified) libcxx/include/__filesystem/directory_entry.h (+2-2)
  • (modified) libcxx/include/__filesystem/directory_iterator.h (+2-2)
  • (modified) libcxx/include/__filesystem/operations.h (+2-2)
  • (modified) libcxx/include/__filesystem/path.h (+14-14)
  • (modified) libcxx/include/__filesystem/recursive_directory_iterator.h (+2-2)
  • (modified) libcxx/include/__format/concepts.h (+1-1)
  • (modified) libcxx/include/__format/format_arg_store.h (+2-2)
  • (modified) libcxx/include/__format/format_context.h (+8-8)
  • (modified) libcxx/include/__format/format_functions.h (+19-19)
  • (modified) libcxx/include/__format/format_parse_context.h (+1-1)
  • (modified) libcxx/include/__format/formatter_bool.h (+1-1)
  • (modified) libcxx/include/__format/formatter_char.h (+4-4)
  • (modified) libcxx/include/__format/formatter_floating_point.h (+4-4)
  • (modified) libcxx/include/__format/formatter_integral.h (+4-4)
  • (modified) libcxx/include/__format/formatter_output.h (+6-7)
  • (modified) libcxx/include/__format/formatter_string.h (+2-2)
  • (modified) libcxx/include/__format/parser_std_format_spec.h (+12-12)
  • (modified) libcxx/include/__format/unicode.h (+6-6)
  • (modified) libcxx/include/__format/write_escaped.h (+2-3)
  • (modified) libcxx/include/__functional/hash.h (+2-2)
  • (modified) libcxx/include/__fwd/fstream.h (+1-1)
  • (modified) libcxx/include/__fwd/ios.h (+1-1)
  • (modified) libcxx/include/__fwd/istream.h (+1-1)
  • (modified) libcxx/include/__fwd/ostream.h (+1-1)
  • (modified) libcxx/include/__fwd/sstream.h (+1-1)
  • (modified) libcxx/include/__fwd/streambuf.h (+1-1)
  • (modified) libcxx/include/__fwd/string.h (+5-5)
  • (modified) libcxx/include/__fwd/string_view.h (+2-2)
  • (modified) libcxx/include/__locale (+14-14)
  • (modified) libcxx/include/__locale_dir/locale_base_api.h (+3-1)
  • (modified) libcxx/include/__locale_dir/locale_base_api/bsd_locale_fallbacks.h (+4-4)
  • (modified) libcxx/include/__mbstate_t.h (+2-2)
  • (modified) libcxx/include/__memory/shared_ptr.h (+6-6)
  • (modified) libcxx/include/__memory_resource/synchronized_pool_resource.h (+4-4)
  • (modified) libcxx/include/__mutex/mutex.h (+2-2)
  • (modified) libcxx/include/__ostream/basic_ostream.h (+5-5)
  • (modified) libcxx/include/__ostream/print.h (+11-11)
  • (modified) libcxx/include/__random/random_device.h (+2-2)
  • (modified) libcxx/include/__ranges/istream_view.h (+1-1)
  • (modified) libcxx/include/__stop_token/atomic_unique_lock.h (+1-1)
  • (modified) libcxx/include/__stop_token/stop_callback.h (+2-2)
  • (modified) libcxx/include/__stop_token/stop_source.h (+2-2)
  • (modified) libcxx/include/__stop_token/stop_state.h (+2-2)
  • (modified) libcxx/include/__stop_token/stop_token.h (+2-2)
  • (modified) libcxx/include/__string/char_traits.h (+3-3)
  • (modified) libcxx/include/__support/xlocale/__posix_l_fallback.h (+5-5)
  • (modified) libcxx/include/__support/xlocale/__strtonum_fallback.h (+1-1)
  • (modified) libcxx/include/__thread/formatter.h (+2-2)
  • (modified) libcxx/include/__thread/id.h (+2-2)
  • (modified) libcxx/include/__thread/jthread.h (+2-2)
  • (modified) libcxx/include/__thread/support.h (+2-2)
  • (modified) libcxx/include/__thread/this_thread.h (+2-2)
  • (modified) libcxx/include/__thread/thread.h (+5-5)
  • (modified) libcxx/include/__thread/timed_backoff_policy.h (+2-2)
  • (modified) libcxx/include/__type_traits/is_integral.h (+1-1)
  • (modified) libcxx/include/barrier (+2-2)
  • (modified) libcxx/include/chrono (+3-4)
  • (modified) libcxx/include/codecvt (+6-6)
  • (modified) libcxx/include/complex (+3-3)
  • (modified) libcxx/include/condition_variable (+2-2)
  • (modified) libcxx/include/cstdlib (+1-1)
  • (modified) libcxx/include/deque (+1-1)
  • (modified) libcxx/include/format (+1-1)
  • (modified) libcxx/include/fstream (+2-2)
  • (modified) libcxx/include/future (+2-2)
  • (modified) libcxx/include/iomanip (+2-2)
  • (modified) libcxx/include/ios (+4-4)
  • (modified) libcxx/include/iosfwd (+3-3)
  • (modified) libcxx/include/iostream (+1-1)
  • (modified) libcxx/include/istream (+3-3)
  • (modified) libcxx/include/latch (+2-2)
  • (modified) libcxx/include/list (+1-1)
  • (modified) libcxx/include/locale (+21-21)
  • (modified) libcxx/include/mutex (+2-2)
  • (modified) libcxx/include/ostream (+2-2)
  • (modified) libcxx/include/print (+21-21)
  • (modified) libcxx/include/ranges (+1-1)
  • (modified) libcxx/include/regex (+17-17)
  • (modified) libcxx/include/semaphore (+2-2)
  • (modified) libcxx/include/shared_mutex (+2-2)
  • (modified) libcxx/include/sstream (+2-2)
  • (modified) libcxx/include/stdatomic.h (+1-1)
  • (modified) libcxx/include/stop_token (+2-2)
  • (modified) libcxx/include/streambuf (+3-3)
  • (modified) libcxx/include/string (+8-8)
  • (modified) libcxx/include/string_view (+2-2)
  • (modified) libcxx/include/syncstream (+10-10)
  • (modified) libcxx/include/thread (+2-2)
  • (modified) libcxx/include/vector (+2-2)
  • (modified) libcxx/include/version (+10-10)
  • (modified) libcxx/include/wchar.h (+2-2)
  • (modified) libcxx/modules/std.compat.cppm.in (+1-1)
  • (modified) libcxx/modules/std.compat/clocale.inc (+2-2)
  • (modified) libcxx/modules/std.compat/cstdlib.inc (+1-1)
  • (modified) libcxx/modules/std.compat/cwchar.inc (+2-2)
  • (modified) libcxx/modules/std.compat/cwctype.inc (+2-2)
  • (modified) libcxx/modules/std.cppm.in (+14-14)
  • (modified) libcxx/modules/std/atomic.inc (+1-1)
  • (modified) libcxx/modules/std/barrier.inc (+2-2)
  • (modified) libcxx/modules/std/chrono.inc (+8-12)
  • (modified) libcxx/modules/std/clocale.inc (+2-2)
  • (modified) libcxx/modules/std/codecvt.inc (+2-2)
  • (modified) libcxx/modules/std/complex.inc (+2-2)
  • (modified) libcxx/modules/std/condition_variable.inc (+2-2)
  • (modified) libcxx/modules/std/cstdlib.inc (+1-1)
  • (modified) libcxx/modules/std/cwchar.inc (+2-2)
  • (modified) libcxx/modules/std/cwctype.inc (+2-2)
  • (modified) libcxx/modules/std/filesystem.inc (+6-6)
  • (modified) libcxx/modules/std/format.inc (+5-5)
  • (modified) libcxx/modules/std/fstream.inc (+7-7)
  • (modified) libcxx/modules/std/future.inc (+2-2)
  • (modified) libcxx/modules/std/iomanip.inc (+2-2)
  • (modified) libcxx/modules/std/ios.inc (+3-3)
  • (modified) libcxx/modules/std/iosfwd.inc (+2-2)
  • (modified) libcxx/modules/std/iostream.inc (+3-3)
  • (modified) libcxx/modules/std/istream.inc (+4-4)
  • (modified) libcxx/modules/std/latch.inc (+2-2)
  • (modified) libcxx/modules/std/locale.inc (+2-2)
  • (modified) libcxx/modules/std/memory.inc (+2-2)
  • (modified) libcxx/modules/std/mutex.inc (+2-2)
  • (modified) libcxx/modules/std/ostream.inc (+5-5)
  • (modified) libcxx/modules/std/print.inc (+2-2)
  • (modified) libcxx/modules/std/random.inc (+1-1)
  • (modified) libcxx/modules/std/ranges.inc (+3-3)
  • (modified) libcxx/modules/std/regex.inc (+8-8)
  • (modified) libcxx/modules/std/semaphore.inc (+2-2)
  • (modified) libcxx/modules/std/shared_mutex.inc (+2-2)
  • (modified) libcxx/modules/std/spanstream.inc (+4-4)
  • (modified) libcxx/modules/std/sstream.inc (+6-6)
  • (modified) libcxx/modules/std/stop_token.inc (+2-2)
  • (modified) libcxx/modules/std/streambuf.inc (+3-3)
  • (modified) libcxx/modules/std/string.inc (+3-3)
  • (modified) libcxx/modules/std/string_view.inc (+1-1)
  • (modified) libcxx/modules/std/strstream.inc (+2-2)
  • (modified) libcxx/modules/std/syncstream.inc (+4-4)
  • (modified) libcxx/modules/std/thread.inc (+4-4)
  • (modified) libcxx/src/algorithm.cpp (+1-1)
  • (modified) libcxx/src/call_once.cpp (+5-5)
  • (modified) libcxx/src/chrono.cpp (+2-2)
  • (modified) libcxx/src/experimental/include/tzdb/tzdb_list_private.h (+6-6)
  • (modified) libcxx/src/filesystem/time_utils.h (+2-2)
  • (modified) libcxx/src/include/atomic_support.h (+4-4)
  • (modified) libcxx/src/include/config_elast.h (+1-1)
  • (modified) libcxx/src/ios.cpp (+1-1)
  • (modified) libcxx/src/ios.instantiations.cpp (+2-2)
  • (modified) libcxx/src/iostream.cpp (+10-10)
  • (modified) libcxx/src/locale.cpp (+94-94)
  • (modified) libcxx/src/memory.cpp (+3-3)
  • (modified) libcxx/src/memory_resource.cpp (+2-2)
  • (modified) libcxx/src/ostream.cpp (+2-2)
  • (modified) libcxx/src/print.cpp (+2-2)
  • (modified) libcxx/src/random_shuffle.cpp (+4-4)
  • (modified) libcxx/src/std_stream.h (+3-3)
  • (modified) libcxx/src/string.cpp (+13-13)
  • (modified) libcxx/src/system_error.cpp (+3-3)
  • (modified) libcxx/test/benchmarks/std_format_spec_string_unicode.bench.cpp (+2-2)
  • (modified) libcxx/test/benchmarks/std_format_spec_string_unicode_escape.bench.cpp (+2-2)
  • (modified) libcxx/test/libcxx/depr/depr.c.headers/extern_c.pass.cpp (+5-5)
  • (modified) libcxx/test/libcxx/feature_test_macro/ftm_metadata.sh.py (+2-2)
  • (modified) libcxx/test/libcxx/feature_test_macro/test_data.json (+2-3)
  • (modified) libcxx/test/libcxx/feature_test_macro/version_header.sh.py (+2-2)
  • (modified) libcxx/test/libcxx/feature_test_macro/version_header_implementation.sh.py (+2-2)
  • (modified) libcxx/test/libcxx/include_as_c.sh.cpp (+7-7)
  • (modified) libcxx/test/libcxx/vendor/apple/availability-with-pedantic-errors.compile.pass.cpp (+1-1)
  • (modified) libcxx/test/std/containers/container.adaptors/container.adaptors.format/format.functions.tests.h (+3-3)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/barrier.version.compile.pass.cpp (+6-6)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.compile.pass.cpp (+8-8)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/fstream.version.compile.pass.cpp (+2-2)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/iomanip.version.compile.pass.cpp (+10-10)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/latch.version.compile.pass.cpp (+6-6)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/mutex.version.compile.pass.cpp (+8-8)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/semaphore.version.compile.pass.cpp (+6-6)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/shared_mutex.version.compile.pass.cpp (+18-18)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/stop_token.version.compile.pass.cpp (+6-6)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/thread.version.compile.pass.cpp (+6-6)
  • (modified) libcxx/test/std/language.support/support.limits/support.limits.general/version.version.compile.pass.cpp (+70-70)
  • (modified) libcxx/test/std/utilities/format/format.range/format.range.fmtmap/format.functions.tests.h (+3-3)
  • (modified) libcxx/test/std/utilities/format/format.range/format.range.fmtset/format.functions.tests.h (+3-3)
  • (modified) libcxx/test/std/utilities/format/format.range/format.range.formatter/format.functions.tests.h (+2-2)
  • (modified) libcxx/test/support/filesystem_test_helper.h (+1-1)
  • (modified) libcxx/test/support/test_macros.h (+10-10)
  • (modified) libcxx/test/tools/clang_tidy_checks/internal_ftm_use.cpp (-13)
  • (modified) libcxx/utils/generate_feature_test_macro_components.py (+20-20)
  • (modified) libcxx/utils/libcxx/header_information.py (+15-15)
  • (modified) libcxx/utils/libcxx/test/dsl.py (+1-1)
  • (modified) libcxx/utils/libcxx/test/features.py (+21-12)
  • (modified) runtimes/cmake/Modules/HandleFlags.cmake (-6)
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 75c926f5432aea..bb03b443178861 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -741,24 +741,24 @@ config_define(${LIBCXX_ABI_VERSION} _LIBCPP_ABI_VERSION)
 config_define(${LIBCXX_ABI_NAMESPACE} _LIBCPP_ABI_NAMESPACE)
 config_define_if(LIBCXX_ABI_FORCE_ITANIUM _LIBCPP_ABI_FORCE_ITANIUM)
 config_define_if(LIBCXX_ABI_FORCE_MICROSOFT _LIBCPP_ABI_FORCE_MICROSOFT)
-config_define_if_not(LIBCXX_ENABLE_THREADS _LIBCPP_HAS_NO_THREADS)
-config_define_if_not(LIBCXX_ENABLE_MONOTONIC_CLOCK _LIBCPP_HAS_NO_MONOTONIC_CLOCK)
-config_define_if_not(LIBCXX_HAS_TERMINAL_AVAILABLE _LIBCPP_HAS_NO_TERMINAL)
+config_define(${LIBCXX_ENABLE_THREADS} _LIBCPP_HAS_THREADS)
+config_define(${LIBCXX_ENABLE_MONOTONIC_CLOCK} _LIBCPP_HAS_MONOTONIC_CLOCK)
+config_define(${LIBCXX_HAS_TERMINAL_AVAILABLE} _LIBCPP_HAS_TERMINAL)
 if (NOT LIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION STREQUAL "default")
   config_define("${LIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION}" _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION)
 endif()
 config_define_if(LIBCXX_HAS_PTHREAD_API _LIBCPP_HAS_THREAD_API_PTHREAD)
 config_define_if(LIBCXX_HAS_EXTERNAL_THREAD_API _LIBCPP_HAS_THREAD_API_EXTERNAL)
 config_define_if(LIBCXX_HAS_WIN32_THREAD_API _LIBCPP_HAS_THREAD_API_WIN32)
-config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC)
+config_define(${LIBCXX_HAS_MUSL_LIBC} _LIBCPP_HAS_MUSL_LIBC)
 config_define_if(LIBCXX_NO_VCRUNTIME _LIBCPP_NO_VCRUNTIME)
-config_define_if_not(LIBCXX_ENABLE_FILESYSTEM _LIBCPP_HAS_NO_FILESYSTEM)
-config_define_if_not(LIBCXX_ENABLE_RANDOM_DEVICE _LIBCPP_HAS_NO_RANDOM_DEVICE)
-config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCPP_HAS_NO_LOCALIZATION)
-config_define_if_not(LIBCXX_ENABLE_UNICODE _LIBCPP_HAS_NO_UNICODE)
-config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCPP_HAS_NO_WIDE_CHARACTERS)
-config_define_if_not(LIBCXX_ENABLE_TIME_ZONE_DATABASE _LIBCPP_HAS_NO_TIME_ZONE_DATABASE)
-config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)
+config_define(${LIBCXX_ENABLE_FILESYSTEM} _LIBCPP_HAS_FILESYSTEM)
+config_define(${LIBCXX_ENABLE_RANDOM_DEVICE} _LIBCPP_HAS_RANDOM_DEVICE)
+config_define(${LIBCXX_ENABLE_LOCALIZATION} _LIBCPP_HAS_LOCALIZATION)
+config_define(${LIBCXX_ENABLE_UNICODE} _LIBCPP_HAS_UNICODE)
+config_define(${LIBCXX_ENABLE_WIDE_CHARACTERS} _LIBCPP_HAS_WIDE_CHARACTERS)
+config_define(${LIBCXX_ENABLE_TIME_ZONE_DATABASE} _LIBCPP_HAS_TIME_ZONE_DATABASE)
+config_define(${LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS} _LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS)
 
 if (LIBCXX_ENABLE_ASSERTIONS)
   message(DEPRECATION "LIBCXX_ENABLE_ASSERTIONS is deprecated and will be removed in LLVM 20. Please use LIBCXX_HARDENING_MODE instead.")
diff --git a/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst b/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
index e7f3de54e6782a..d103c49e25952f 100644
--- a/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
+++ b/libcxx/docs/DesignDocs/ThreadingSupportAPI.rst
@@ -45,9 +45,9 @@ API but leaves out the implementation.
 Threading Configuration Macros
 ==============================
 
-**_LIBCPP_HAS_NO_THREADS**
-  This macro is defined when libc++ is built without threading support. It
-  should not be manually defined by the user.
+**_LIBCPP_HAS_THREADS**
+  This macro is set to 1 when libc++ is built with threading support. Otherwise
+  it is set to 0. It should not be manually defined by the user.
 
 **_LIBCPP_HAS_THREAD_API_EXTERNAL**
   This macro is defined when libc++ should use the ``<__external_threading>``
diff --git a/libcxx/include/__algorithm/find.h b/libcxx/include/__algorithm/find.h
index 6f23ec3f6fc69d..14b8a7804887b0 100644
--- a/libcxx/include/__algorithm/find.h
+++ b/libcxx/include/__algorithm/find.h
@@ -29,7 +29,7 @@
 #include <__utility/move.h>
 #include <limits>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
 #  include <cwchar>
 #endif
 
@@ -65,7 +65,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _T
   return __last;
 }
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
 template <class _Tp,
           class _Up,
           class _Proj,
@@ -77,7 +77,7 @@ _LIBCPP_HIDE_FROM_ABI _LIBCPP_CONSTEXPR_SINCE_CXX14 _Tp* __find(_Tp* __first, _T
     return __ret;
   return __last;
 }
-#endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#endif // _LIBCPP_HAS_WIDE_CHARACTERS
 
 // TODO: This should also be possible to get right with different signedness
 // cast integral types to allow vectorization
diff --git a/libcxx/include/__algorithm/lexicographical_compare.h b/libcxx/include/__algorithm/lexicographical_compare.h
index 1de3ca13e1b45c..ebe7e3b56a292e 100644
--- a/libcxx/include/__algorithm/lexicographical_compare.h
+++ b/libcxx/include/__algorithm/lexicographical_compare.h
@@ -26,7 +26,7 @@
 #include <__type_traits/is_trivially_lexicographically_comparable.h>
 #include <__type_traits/is_volatile.h>
 
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
 #  include <cwchar>
 #endif
 
@@ -78,14 +78,14 @@ __lexicographical_compare(_Tp* __first1, _Tp* __last1, _Tp* __first2, _Tp* __las
       return __last1 - __first1 < __last2 - __first2;
     return __res < 0;
   }
-#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  if _LIBCPP_HAS_WIDE_CHARACTERS
   else if constexpr (is_same<__remove_cv_t<_Tp>, wchar_t>::value) {
     auto __res = std::__constexpr_wmemcmp(__first1, __first2, std::min(__last1 - __first1, __last2 - __first2));
     if (__res == 0)
       return __last1 - __first1 < __last2 - __first2;
     return __res < 0;
   }
-#  endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  endif // _LIBCPP_HAS_WIDE_CHARACTERS
   else {
     auto __res = std::mismatch(__first1, __last1, __first2, __last2);
     if (__res.second == __last2)
diff --git a/libcxx/include/__algorithm/sort.h b/libcxx/include/__algorithm/sort.h
index 0b2137dee2f77e..5490d8049bf7c8 100644
--- a/libcxx/include/__algorithm/sort.h
+++ b/libcxx/include/__algorithm/sort.h
@@ -894,7 +894,7 @@ template <class _Comp, class _RandomAccessIterator>
 void __sort(_RandomAccessIterator, _RandomAccessIterator, _Comp);
 
 extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<char>&, char*>(char*, char*, __less<char>&);
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
 extern template _LIBCPP_EXPORTED_FROM_ABI void __sort<__less<wchar_t>&, wchar_t*>(wchar_t*, wchar_t*, __less<wchar_t>&);
 #endif
 extern template _LIBCPP_EXPORTED_FROM_ABI void
@@ -941,7 +941,7 @@ template <class _Type>
 using __sort_is_specialized_in_library = __is_any_of<
     _Type,
     char,
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
     wchar_t,
 #endif
     signed char,
diff --git a/libcxx/include/__atomic/aliases.h b/libcxx/include/__atomic/aliases.h
index afc64eaaa69e7b..605c524a3fbc38 100644
--- a/libcxx/include/__atomic/aliases.h
+++ b/libcxx/include/__atomic/aliases.h
@@ -42,7 +42,7 @@ using atomic_char8_t = atomic<char8_t>;
 #endif
 using atomic_char16_t = atomic<char16_t>;
 using atomic_char32_t = atomic<char32_t>;
-#ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#if _LIBCPP_HAS_WIDE_CHARACTERS
 using atomic_wchar_t = atomic<wchar_t>;
 #endif
 
diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h
index aaf81f58731a98..08f3497fef9f45 100644
--- a/libcxx/include/__atomic/atomic_sync.h
+++ b/libcxx/include/__atomic/atomic_sync.h
@@ -69,7 +69,7 @@ struct __atomic_wait_poll_impl {
   }
 };
 
-#ifndef _LIBCPP_HAS_NO_THREADS
+#if _LIBCPP_HAS_THREADS
 
 _LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT;
 _LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT;
@@ -163,7 +163,7 @@ _LIBCPP_AVAILABILITY_SYNC _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _
   std::__cxx_atomic_notify_all(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a));
 }
 
-#else // _LIBCPP_HAS_NO_THREADS
+#else // _LIBCPP_HAS_THREADS
 
 template <class _AtomicWaitable, class _Poll>
 _LIBCPP_HIDE_FROM_ABI void __atomic_wait_unless(const _AtomicWaitable& __a, _Poll&& __poll, memory_order __order) {
@@ -177,7 +177,7 @@ _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable&) {}
 template <class _AtomicWaitable>
 _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable&) {}
 
-#endif // _LIBCPP_HAS_NO_THREADS
+#endif // _LIBCPP_HAS_THREADS
 
 template <typename _Tp>
 _LIBCPP_HIDE_FROM_ABI bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp const& __rhs) {
diff --git a/libcxx/include/__chrono/convert_to_tm.h b/libcxx/include/__chrono/convert_to_tm.h
index 3a51019b80784a..5f1b2632f629a5 100644
--- a/libcxx/include/__chrono/convert_to_tm.h
+++ b/libcxx/include/__chrono/convert_to_tm.h
@@ -180,8 +180,7 @@ _LIBCPP_HIDE_FROM_ABI _Tm __convert_to_tm(const _ChronoT& __value) {
     // Has no time information.
   } else if constexpr (same_as<_ChronoT, chrono::local_info>) {
     // Has no time information.
-#    if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&                          \
-        !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#    if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
   } else if constexpr (__is_specialization_v<_ChronoT, chrono::zoned_time>) {
     return std::__convert_to_tm<_Tm>(
         chrono::sys_time<typename _ChronoT::duration>{__value.get_local_time().time_since_epoch()});
diff --git a/libcxx/include/__chrono/formatter.h b/libcxx/include/__chrono/formatter.h
index 8389e2cbf9e595..c1b57209b938d9 100644
--- a/libcxx/include/__chrono/formatter.h
+++ b/libcxx/include/__chrono/formatter.h
@@ -12,7 +12,7 @@
 
 #include <__config>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
 
 #  include <__algorithm/ranges_copy.h>
 #  include <__chrono/calendar.h>
@@ -143,8 +143,7 @@ __format_sub_seconds(basic_stringstream<_CharT>& __sstr, const chrono::hh_mm_ss<
                    __value.fractional_width);
 }
 
-#    if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) &&                   \
-        !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#    if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
 template <class _CharT, class _Duration, class _TimeZonePtr>
 _LIBCPP_HIDE_FROM_ABI void
 __format_sub_seconds(basic_stringstream<_CharT>& __sstr, const chrono::zoned_time<_Duration, _TimeZonePtr>& __value) {
@@ -156,8 +155,7 @@ template <class _Tp>
 consteval bool __use_fraction() {
   if constexpr (__is_time_point<_Tp>)
     return chrono::hh_mm_ss<typename _Tp::duration>::fractional_width;
-#    if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) &&                   \
-        !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#    if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB) && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
   else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
     return chrono::hh_mm_ss<typename _Tp::duration>::fractional_width;
 #    endif
@@ -232,7 +230,7 @@ _LIBCPP_HIDE_FROM_ABI __time_zone __convert_to_time_zone([[maybe_unused]] const
 #    if !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
   if constexpr (same_as<_Tp, chrono::sys_info>)
     return {__value.abbrev, __value.offset};
-#      if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#      if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
   else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
     return __formatter::__convert_to_time_zone(__value.get_info());
 #      endif
@@ -450,7 +448,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __weekday_ok(const _Tp& __value) {
     return true;
   else if constexpr (same_as<_Tp, chrono::local_info>)
     return true;
-#      if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#      if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
   else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
     return true;
 #      endif
@@ -500,7 +498,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __weekday_name_ok(const _Tp& __value) {
     return true;
   else if constexpr (same_as<_Tp, chrono::local_info>)
     return true;
-#      if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#      if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
   else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
     return true;
 #      endif
@@ -550,7 +548,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __date_ok(const _Tp& __value) {
     return true;
   else if constexpr (same_as<_Tp, chrono::local_info>)
     return true;
-#      if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#      if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
   else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
     return true;
 #      endif
@@ -600,7 +598,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr bool __month_name_ok(const _Tp& __value) {
     return true;
   else if constexpr (same_as<_Tp, chrono::local_info>)
     return true;
-#      if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#      if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
   else if constexpr (__is_specialization_v<_Tp, chrono::zoned_time>)
     return true;
 #      endif
@@ -964,7 +962,7 @@ struct formatter<chrono::local_info, _CharT> : public __formatter_chrono<_CharT>
     return _Base::__parse(__ctx, __format_spec::__fields_chrono, __format_spec::__flags{});
   }
 };
-#      if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#      if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
 // Note due to how libc++'s formatters are implemented there is no need to add
 // the exposition only local-time-format-t abstraction.
 template <class _Duration, class _TimeZonePtr, __fmt_char_type _CharT>
@@ -977,13 +975,13 @@ struct formatter<chrono::zoned_time<_Duration, _TimeZonePtr>, _CharT> : public _
     return _Base::__parse(__ctx, __format_spec::__fields_chrono, __format_spec::__flags::__clock);
   }
 };
-#      endif // !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#      endif // _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
 #    endif   // !defined(_LIBCPP_HAS_NO_EXPERIMENTAL_TZDB)
 
 #  endif // if _LIBCPP_STD_VER >= 20
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // _LIBCPP_HAS_LOCALIZATION
 
 #endif //  _LIBCPP___CHRONO_FORMATTER_H
diff --git a/libcxx/include/__chrono/high_resolution_clock.h b/libcxx/include/__chrono/high_resolution_clock.h
index 0697fd2de9b4de..d324c7f0283bfe 100644
--- a/libcxx/include/__chrono/high_resolution_clock.h
+++ b/libcxx/include/__chrono/high_resolution_clock.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace chrono {
 
-#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
+#if _LIBCPP_HAS_MONOTONIC_CLOCK
 typedef steady_clock high_resolution_clock;
 #else
 typedef system_clock high_resolution_clock;
diff --git a/libcxx/include/__chrono/ostream.h b/libcxx/include/__chrono/ostream.h
index 3420fb12bcdb0b..ca6d1605d0f87e 100644
--- a/libcxx/include/__chrono/ostream.h
+++ b/libcxx/include/__chrono/ostream.h
@@ -12,7 +12,7 @@
 
 #include <__config>
 
-#ifndef _LIBCPP_HAS_NO_LOCALIZATION
+#if _LIBCPP_HAS_LOCALIZATION
 
 #  include <__chrono/calendar.h>
 #  include <__chrono/day.h>
@@ -86,7 +86,7 @@ _LIBCPP_HIDE_FROM_ABI auto __units_suffix() {
   else if constexpr (same_as<typename _Period::type, nano>)
     return _LIBCPP_STATICALLY_WIDEN(_CharT, "ns");
   else if constexpr (same_as<typename _Period::type, micro>)
-#    ifndef _LIBCPP_HAS_NO_UNICODE
+#    if _LIBCPP_HAS_UNICODE
     return _LIBCPP_STATICALLY_WIDEN(_CharT, "\u00b5s");
 #    else
     return _LIBCPP_STATICALLY_WIDEN(_CharT, "us");
@@ -307,7 +307,7 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const local_info& __info) {
              _LIBCPP_STATICALLY_WIDEN(_CharT, "{}: {{{}, {}}}"), __result(), __info.first, __info.second);
 }
 
-#      if !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
+#      if _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM
 template <class _CharT, class _Traits, class _Duration, class _TimeZonePtr>
 _LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
 operator<<(basic_ostream<_CharT, _Traits>& __os, const zoned_time<_Duration, _TimeZonePtr>& __tp) {
@@ -322,6 +322,6 @@ operator<<(basic_ostream<_CharT, _Traits>& __os, const zoned_time<_Duration, _Ti
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // !_LIBCPP_HAS_NO_LOCALIZATION
+#endif // _LIBCPP_HAS_LOCALIZATION
 
 #endif // _LIBCPP___CHRONO_OSTREAM_H
diff --git a/libcxx/include/__chrono/parser_std_format_spec.h b/libcxx/include/__chrono/parser_std_format_spec.h
index c9cfcc6d572f41..3976864c12b983 100644
--- a/libcxx/include/__chrono/parser_std_format_spec.h
+++ b/libcxx/include/__chrono/parser_std_format_spec.h
@@ -12,7 +12,7 @@
 
 #include <__config>
 
-#if !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#if _LIBCPP_HAS_LOCALIZATION
 
 #  include <__format/concepts.h>
 #  include <__format/format_error.h>
@@ -416,6 +416,6 @@ class _LIBCPP_TEMPLATE_VIS __parser_chrono {
 
 _LIBCPP_END_NAMESPACE_STD
 
-#endif // !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#endif // _LIBCPP_HAS_LOCALIZATION
 
 #endif // _LIBCPP___CHRONO_PARSER_STD_FORMAT_SPEC_H
diff --git a/libcxx/include/__chrono/statically_widen.h b/libcxx/include/__chrono/statically_widen.h
index 680483a59ac2c4..40e085633b8c16 100644
--- a/libcxx/include/__chrono/statically_widen.h
+++ b/libcxx/include/__chrono/statically_widen.h
@@ -24,7 +24,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 #if _LIBCPP_STD_VER >= 20
 
-#  ifndef _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  if _LIBCPP_HAS_WIDE_CHARACTERS
 template <__fmt_char_type _CharT>
 _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __statically_widen(const char* __str, const wchar_t* __wstr) {
   if constexpr (same_as<_CharT, char>)
@@ -33,7 +33,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __statically_widen(const char* __s
     return __wstr;
 }
 #    define _LIBCPP_STATICALLY_WIDEN(_CharT, __str) ::std::__statically_widen<_CharT>(__str, L##__str)
-#  else // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  else // _LIBCPP_HAS_WIDE_CHARACTERS
 
 // Without this indirection the unit test test/libcxx/modules_include.sh.cpp
 // fails for the CI build "No wide characters". This seems like a bug.
@@ -43,7 +43,7 @@ _LIBCPP_HIDE_FROM_ABI constexpr const _CharT* __statically_widen(const char* __s
   return __str;
 }
 #    define _LIBCPP_STATICALLY_WIDEN(_CharT, __str) ::std::__statically_widen<_CharT>(__str)
-#  endif // _LIBCPP_HAS_NO_WIDE_CHARACTERS
+#  endif // _LIBCPP_HAS_WIDE_CHARACTERS
 
 #endif // _LIBCPP_STD_VER >= 20
 
diff --git a/libcxx/include/__chrono/steady_clock.h b/libcxx/include/__chrono/steady_clock.h
index 612a7f156e6343..1b247b2c286094 100644
--- a/libcxx/include/__chrono/steady_clock.h
+++ b/libcxx/include/__chrono/steady_clock.h
@@ -22,7 +22,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD
 
 namespace chrono {
 
-#ifndef _LIBCPP_HAS_NO_MONOTONIC_CLOCK
+#if _LIBCPP_HAS_MONOTONIC_CLOCK
 class _LIBCPP_EXPORTED_FROM_ABI steady_clock {
 public:
   typedef nanoseconds duration;
diff --git a/libcxx/include/__chrono/time_zone.h b/libcxx/include/__chrono/time_zone.h
index de11dac1eef0c2..3bfe482a146244 100644
--- a/libcxx/include/__chrono/time_zone.h
+++ b/libcxx/include/__chrono/time_zone.h
@@ -37,8 +37,7 @@ _LIBCPP_PUSH_MACROS
 
 _LIBCPP_BEGIN_NAMESPACE_STD
 
-#  if _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM) &&   \
-      !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#  if _LIBCPP_STD_VER >= 20 && _LIBCPP_HAS_TIME_ZONE_DATABASE && _LIBCPP_HAS_FILESYSTEM && _LIBCPP_HAS_LOCALIZATION
 
 namespace chrono {
 
@@ -170,8 +169,8 @@ operator<=>(const time_zone& __x, const time_zone& __y) noexcept {
 
 } // namespace chrono
 
-#  endif // _LIBCPP_STD_VER >= 20 && !defined(_LIBCPP_HAS_NO_TIME_ZONE_DATABASE) && !defined(_LIBCPP_HAS_NO_FILESYSTEM)
-         // && !defined(_LIBCPP_HAS_NO_LOCALIZATION)
+#  endif // _LIBCPP_STD_VE...
[truncated]

Comment on lines 742 to 743
config_define_if(LIBCXX_ABI_FORCE_ITANIUM _LIBCPP_ABI_FORCE_ITANIUM)
config_define_if(LIBCXX_ABI_FORCE_MICROSOFT _LIBCPP_ABI_FORCE_MICROSOFT)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like us to make these 0-1 macros (and the threading macros below) as well just to make everything consistent. Otherwise this is very confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cmake Build system in general and CMake in particular libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants