Skip to content

Commit

Permalink
depends: add the new LLVM debug macro
Browse files Browse the repository at this point in the history
`LIBCPP_HARDENING_MODE` is the new macro, the previous one was removed in
LLVM 18.

See https://libcxx.llvm.org/Hardening.html.
  • Loading branch information
fanquake committed Apr 7, 2024
1 parent bb1383e commit 5efebc0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion depends/hosts/linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ linux_release_CXXFLAGS=$(linux_release_CFLAGS)
linux_debug_CFLAGS=-O1 -g
linux_debug_CXXFLAGS=$(linux_debug_CFLAGS)

linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC -D_LIBCPP_ENABLE_DEBUG_MODE=1
# https://gcc.gnu.org/onlinedocs/libstdc++/manual/debug_mode.html
linux_debug_CPPFLAGS=-D_GLIBCXX_DEBUG -D_GLIBCXX_DEBUG_PEDANTIC

# https://libcxx.llvm.org/Hardening.html
linux_debug_CPPFLAGS+=-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_DEBUG

ifeq (86,$(findstring 86,$(build_arch)))
i686_linux_CC=gcc -m32
Expand Down

0 comments on commit 5efebc0

Please sign in to comment.