diff --git a/third_party/lyra/toolchain/android/BUILD.tpl b/third_party/lyra/toolchain/android/BUILD.tpl index a459ad79..3995fac1 100644 --- a/third_party/lyra/toolchain/android/BUILD.tpl +++ b/third_party/lyra/toolchain/android/BUILD.tpl @@ -93,6 +93,7 @@ cc_toolchain_config( "-D_LIBCPP_ABI_NAMESPACE=Cr", "-D_LIBCPP_ABI_VERSION=2", "-D_LIBCPP_DISABLE_AVAILABILITY", + '-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE', "-fexperimental-relative-c++-abi-vtables", "-fexceptions", ], diff --git a/third_party/lyra/toolchain/linux_x86_64/BUILD.tpl b/third_party/lyra/toolchain/linux_x86_64/BUILD.tpl index 56a5aa87..6052c5aa 100644 --- a/third_party/lyra/toolchain/linux_x86_64/BUILD.tpl +++ b/third_party/lyra/toolchain/linux_x86_64/BUILD.tpl @@ -213,6 +213,7 @@ cc_toolchain_config( "-D_LIBCPP_ABI_NAMESPACE=Cr", "-D_LIBCPP_ABI_VERSION=2", "-D_LIBCPP_DISABLE_AVAILABILITY", + '-D_LIBCPP_HARDENING_MODE=_LIBCPP_HARDENING_MODE_EXTENSIVE', ], link_flags = [ "-Wl,-no-as-needed",