[dart,flutter] Enable assertion in non-product runners which is crucial to hot reload
This is a follow-up to the changes in 42d866c9420c85794f0b8713a74022afc1be075a
Change-Id: Ib8800ed0e3b04bde3a2b973b35e54e38667503c1
diff --git a/runtime/dart/dart_component.gni b/runtime/dart/dart_component.gni
index bcf321c..6985487 100644
--- a/runtime/dart/dart_component.gni
+++ b/runtime/dart/dart_component.gni
@@ -896,7 +896,7 @@
rebase_path(shared_snapshot_instructions_path),
"--print-instructions-sizes-to=" + rebase_path(stats_json_path),
]
- if (is_debug && !product) {
+ if (!product) {
args += [ "--enable_asserts" ]
}
args += [ rebase_path(kernel_path) ]
diff --git a/runtime/dart_runner/dart_runner.cc b/runtime/dart_runner/dart_runner.cc
index 998ec9a..a42b18a 100644
--- a/runtime/dart_runner/dart_runner.cc
+++ b/runtime/dart_runner/dart_runner.cc
@@ -54,9 +54,9 @@
"--no_use_field_guards",
#endif
-#if !defined(NDEBUG) && !defined(DART_PRODUCT)
+#if !defined(DART_PRODUCT)
"--enable_asserts",
-#endif // !defined(NDEBUG)
+#endif // !defined(DART_PRODUCT)
// clang-format on
};
diff --git a/runtime/dart_runner/embedder/BUILD.gn b/runtime/dart_runner/embedder/BUILD.gn
index 37c0ebd..9b52153 100644
--- a/runtime/dart_runner/embedder/BUILD.gn
+++ b/runtime/dart_runner/embedder/BUILD.gn
@@ -52,7 +52,7 @@
"--snapshot_kind=vm-aot-assembly",
"--assembly=" + rebase_path(snapshot_assembly),
]
- if (is_debug && !invoker.product) {
+ if (!invoker.product) {
args += [ "--enable_asserts" ]
}
args += [ rebase_path(shim_kernel) ]
diff --git a/runtime/dart_runner/kernel/BUILD.gn b/runtime/dart_runner/kernel/BUILD.gn
index 87a0ce6..2e43dd7 100644
--- a/runtime/dart_runner/kernel/BUILD.gn
+++ b/runtime/dart_runner/kernel/BUILD.gn
@@ -85,7 +85,7 @@
"--write_v8_snapshot_profile_to=" +
rebase_path(snapshot_profile, root_build_dir),
]
- if (is_debug && !invoker.product) {
+ if (!invoker.product) {
args += [ "--enable_asserts" ]
}
args += [ rebase_path(platform_dill) ]
diff --git a/runtime/flutter_runner/kernel/BUILD.gn b/runtime/flutter_runner/kernel/BUILD.gn
index 7d5db67..2e3d125 100644
--- a/runtime/flutter_runner/kernel/BUILD.gn
+++ b/runtime/flutter_runner/kernel/BUILD.gn
@@ -110,7 +110,7 @@
"--write_v8_snapshot_profile_to=" +
rebase_path(snapshot_profile, root_build_dir),
]
- if (is_debug && !invoker.product) {
+ if (!invoker.product) {
args += [ "--enable_asserts" ]
}
args += [ rebase_path(platform_dill) ]