Skip to content

Commit 4a82503

Browse files
committed
build: use _LIBCPP_ENABLE_DEBUG_MODE over ENABLE_ASSERTIONS
`_LIBCPP_ENABLE_ASSERTIONS` is deprecated, and will be removed. [See (from libc++ __config in main)](https://github.com/llvm/llvm-project/blob/b57df9fe9a1a230f277d671bfa0884bbda9fc1c5/libcxx/include/__config#L205-L209): > TODO(hardening): remove this in LLVM 19. > This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes) > equivalent to setting the safe mode. > ifdef _LIBCPP_ENABLE_ASSERTIONS > warning "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_ENABLE_SAFE_MODE instead." From LLVM 17, `_LIBCPP_ENABLE_DEBUG_MODE` can be used instead. See https://libcxx.llvm.org/Hardening.html. Related to #28476.
1 parent f5c5dda commit 4a82503

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

depends/hosts/linux.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ linux_release_CXXFLAGS=$(linux_release_CFLAGS)
1717
linux_debug_CFLAGS=-O1
1818
linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)
1919

20-
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_ENABLE_ASSERTIONS=1
20+
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_ENABLE_DEBUG_MODE=1
2121

2222
ifeq (86,$(findstring 86,$(build_arch)))
2323
i686_linux_CC=gcc -m32

0 commit comments

Comments
 (0)