Skip to content

Commit 5b504e1

Browse files
authored
[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: flutter/flutter#148279
1 parent 4e0f2d9 commit 5b504e1

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build/config/BUILD.gn

+5
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)