[libcxx-commits] [compiler-rt] [libcxx] [libc++][NFC] Removed `LIBCXX_ENABLE_ASSERTIONS` (PR #176574)

Hristo Hristov via libcxx-commits libcxx-commits at lists.llvm.org
Sat Jan 17 07:47:22 PST 2026


https://github.com/H-G-Hristov created https://github.com/llvm/llvm-project/pull/176574

Removed obsolete macro

>From 17b1c86b9f6608cd4f730f23b3e36ab73f0d8021 Mon Sep 17 00:00:00 2001
From: Hristo Hristov <hghristov.rmm at gmail.com>
Date: Sat, 17 Jan 2026 17:46:52 +0200
Subject: [PATCH] [libc++][NFC] Removed `LIBCXX_ENABLE_ASSERTIONS`

Removed obsolete macro
---
 .../sanitizer_common/symbolizer/scripts/build_symbolizer.sh   | 1 -
 libcxx/CMakeLists.txt                                         | 4 ----
 2 files changed, 5 deletions(-)

diff --git a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
index 1519a9b926866..3dbc328ca76b6 100755
--- a/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
+++ b/compiler-rt/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh
@@ -109,7 +109,6 @@ if [[ ! -f ${LIBCXX_BUILD}/build.ninja ]]; then
     -DLIBCXXABI_ENABLE_ASSERTIONS=OFF \
     -DLIBCXXABI_ENABLE_EXCEPTIONS=OFF \
     -DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
-    -DLIBCXX_ENABLE_ASSERTIONS=OFF \
     -DLIBCXX_ENABLE_EXCEPTIONS=OFF \
     -DLIBCXX_ENABLE_RTTI=OFF \
     -DCMAKE_SHARED_LINKER_FLAGS="$LINKFLAGS" \
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 00ea2deef196e..0850c57efd8af 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -779,10 +779,6 @@ elseif (RUNTIMES_USE_LIBC STREQUAL "newlib")
   config_define(1 _LIBCPP_LIBC_NEWLIB)
 endif()
 
-# TODO: Remove in LLVM 21. We're leaving an error to make this fail explicitly.
-if (LIBCXX_ENABLE_ASSERTIONS)
-  message(FATAL_ERROR "LIBCXX_ENABLE_ASSERTIONS has been removed. Please use LIBCXX_HARDENING_MODE instead.")
-endif()
 if (LIBCXX_HARDENING_MODE STREQUAL "none")
   config_define(2 _LIBCPP_HARDENING_MODE_DEFAULT)
 elseif (LIBCXX_HARDENING_MODE STREQUAL "fast")



More information about the libcxx-commits mailing list