File tree 2 files changed +13
-1
lines changed
2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -140,6 +140,10 @@ config("dart_config") {
140
140
}
141
141
}
142
142
143
+ if (use_nnbd ) {
144
+ defines += [ " DART_BUILT_WITH_NNBD_FLAG" ]
145
+ }
146
+
143
147
if (! is_win ) {
144
148
cflags = [
145
149
" -Werror" ,
Original file line number Diff line number Diff line change @@ -123,8 +123,16 @@ class Dart : public AllStatic {
123
123
static Dart_EntropySource entropy_source_callback () {
124
124
return entropy_source_callback_;
125
125
}
126
+
127
+ // TODO(dartbug.com/40342): Delete these functions.
126
128
static void set_non_nullable_flag (bool value) { non_nullable_flag_ = value; }
127
- static bool non_nullable_flag () { return non_nullable_flag_; }
129
+ static bool non_nullable_flag () {
130
+ #ifdef DART_BUILT_WITH_NNBD_FLAG
131
+ return true ;
132
+ #else
133
+ return non_nullable_flag_;
134
+ #endif
135
+ }
128
136
129
137
private:
130
138
static void WaitForIsolateShutdown ();
You can’t perform that action at this time.
0 commit comments