Skip to content

[GLib] _LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_HARDENING_MODE instead on macOS 15 #46690

@hiroyuki-sato

Description

@hiroyuki-sato

Describe the bug, including details regarding any error messages, version, and platform.

  • macOS: 15.5
  • clang: Apple clang version 17.0.0 (clang-1700.0.13.5)
  • source: f1c6619
meson setup \
      --backend=ninja \
      --prefix=/tmp/local \
      --libdir=lib \
      --pkg-config-path=/tmp/local/lib/pkgconfig \
      -Ddoc=false \
      -Dvapi=false \
      -Dwerror=false \
      c_glib.build \
      c_glib
ninja -C c_glib.build all
[8/103] Compiling C++ object arrow-glib/libarrow-glib.2100.dylib.p/codec.cpp.o
In file included from ../c_glib/arrow-glib/codec.cpp:20:
In file included from ../c_glib/arrow-glib/codec.hpp:22:
In file included from /tmp/local/include/arrow/util/compression.h:20:
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/cstdint:143:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:48:6: warning: "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_HARDENING_MODE instead" [-W#warnings]
   48 | #    warning "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_HARDENING_MODE instead"
      |      ^
1 warning generated.

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config

// HARDENING {

// This is for backward compatibility -- make enabling `_LIBCPP_ENABLE_ASSERTIONS` (which predates hardening modes)
// equivalent to setting the extensive mode. This is deprecated and will be removed in LLVM 20.
#  ifdef _LIBCPP_ENABLE_ASSERTIONS
#    warning "_LIBCPP_ENABLE_ASSERTIONS is deprecated, please use _LIBCPP_HARDENING_MODE instead"
#    if _LIBCPP_ENABLE_ASSERTIONS != 0 && _LIBCPP_ENABLE_ASSERTIONS != 1
#      error "_LIBCPP_ENABLE_ASSERTIONS must be set to 0 or 1"
#    endif
#    if _LIBCPP_ENABLE_ASSERTIONS
#      define _LIBCPP_HARDENING_MODE _LIBCPP_HARDENING_MODE_EXTENSIVE
#    endif
#  endif

Component(s)

GLib

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions