mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 10:49:00 +00:00
[vm] Reland the flag flip behind the --nnbd build flag
Bug: https://github.com/dart-lang/sdk/issues/40409 Bug: https://github.com/dart-lang/sdk/issues/40179 Change-Id: Ib84926ef15068d23dcac7b89843c454b8446b28e Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/134062 Reviewed-by: Siva Annamalai <asiva@google.com> Commit-Queue: Liam Appelbe <liama@google.com>
This commit is contained in:
parent
d550879d9d
commit
00e481aab0
2 changed files with 13 additions and 1 deletions
|
@ -140,6 +140,10 @@ config("dart_config") {
|
|||
}
|
||||
}
|
||||
|
||||
if (use_nnbd) {
|
||||
defines += [ "DART_BUILT_WITH_NNBD_FLAG" ]
|
||||
}
|
||||
|
||||
if (!is_win) {
|
||||
cflags = [
|
||||
"-Werror",
|
||||
|
|
|
@ -123,8 +123,16 @@ class Dart : public AllStatic {
|
|||
static Dart_EntropySource entropy_source_callback() {
|
||||
return entropy_source_callback_;
|
||||
}
|
||||
|
||||
// TODO(dartbug.com/40342): Delete these functions.
|
||||
static void set_non_nullable_flag(bool value) { non_nullable_flag_ = value; }
|
||||
static bool non_nullable_flag() { return non_nullable_flag_; }
|
||||
static bool non_nullable_flag() {
|
||||
#ifdef DART_BUILT_WITH_NNBD_FLAG
|
||||
return true;
|
||||
#else
|
||||
return non_nullable_flag_;
|
||||
#endif
|
||||
}
|
||||
|
||||
private:
|
||||
static void WaitForIsolateShutdown();
|
||||
|
|
Loading…
Reference in a new issue