[Darwin] Disable NSAsserts in release builds. (#860) Chromium has a similar gn flag to disable asserts in release builds: https://source.chromium.org/chromium/chromium/src/+/main:build/config/BUILD.gn;drc=9dab28144192cefadbb96b778ef866ea3deb74ff;l=148 Related: https://github.com/flutter/flutter/issues/148279
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn index 4e62965..867c19b 100644 --- a/build/config/BUILD.gn +++ b/build/config/BUILD.gn
@@ -84,6 +84,11 @@ 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.