diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 4e629655bf..867c19b5ea 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn @@ -84,6 +84,11 @@ config("debug") { config("release") { defines = [ "NDEBUG" ] + if (is_mac || is_ios) { + # Disable NSAsserts in release builds. + defines += [ "NS_BLOCK_ASSERTIONS=1" ] + } + # Sanitizers. # TODO(GYP) The GYP build has "release_valgrind_build == 0" for this # condition. When Valgrind is set up, we need to do the same here.