Skip to content
This repository was archived by the owner on Apr 21, 2025. It is now read-only.

Commit 88d344f

Browse files
committed
[Darwin] Disable NSAsserts in release builds.
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: flutter/flutter#148279
1 parent 81cdc0c commit 88d344f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

build/config/BUILD.gn

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ config("debug") {
8484
config("release") {
8585
defines = [ "NDEBUG" ]
8686

87+
if (is_mac || is_ios) {
88+
# Disable NSAsserts in release builds.
89+
defines += [ "NS_BLOCK_ASSERTIONS=1" ]
90+
}
91+
8792
# Sanitizers.
8893
# TODO(GYP) The GYP build has "release_valgrind_build == 0" for this
8994
# condition. When Valgrind is set up, we need to do the same here.

0 commit comments

Comments
 (0)