|
|
@@ -511,10 +511,13 @@ def _impl(ctx):
|
|
|
|
|
|
# With clang 14 and lower, we expect it to be built with libc++ debug
|
|
|
# support. In later LLVM versions, we expect the assertions define to work.
|
|
|
+ # clang 17 deprecates LIBCPP_ENABLE_ASSERTIONS in favor of HARDENED_MODE.
|
|
|
if clang_version and clang_version <= 14:
|
|
|
libcpp_debug_flags = ["-D_LIBCPP_DEBUG=1"]
|
|
|
- else:
|
|
|
+ elif clang_version and clang_version <= 16:
|
|
|
libcpp_debug_flags = ["-D_LIBCPP_ENABLE_ASSERTIONS=1"]
|
|
|
+ else:
|
|
|
+ libcpp_debug_flags = ["-D_LIBCPP_ENABLE_HARDENED_MODE=1"]
|
|
|
|
|
|
linux_flags_feature = feature(
|
|
|
name = "linux_flags",
|