Skip to content

Commit e5086f9

Browse files
davidmorgancommit-bot@chromium.org
authored andcommitted
Support google3 DEBUG/NDEBUG handling.
Change-Id: I04beeb6c24969610255d52a1816e444e57dfe51f Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/153616 Reviewed-by: Martin Kustermann <[email protected]> Commit-Queue: David Morgan <[email protected]>
1 parent 5d47c5f commit e5086f9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

runtime/platform/globals.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@
1515
#define FALL_THROUGH ((void)0)
1616
#endif
1717

18+
#if defined(GOOGLE3)
19+
// google3 builds use NDEBUG to indicate non-debug builds which is different
20+
// from the way the Dart project expects it: DEBUG indicating a debug build.
21+
#if !defined(NDEBUG) && !defined(DEBUG)
22+
#define DEBUG
23+
#endif // !NDEBUG && !DEBUG
24+
#endif // GOOGLE3
25+
1826
// __STDC_FORMAT_MACROS has to be defined before including <inttypes.h> to
1927
// enable platform independent printf format specifiers.
2028
#ifndef __STDC_FORMAT_MACROS

0 commit comments

Comments
 (0)