[vm] Enable nnbd experiment when building the SDK with --nnbd
This is necessary as of https://dart-review.googlesource.com/c/sdk/+/127961 to use the experiment flag in the VM. Tested: Late modifier tests that had stopped building now pass again. Change-Id: I49a5f1e99f40c6e8d785b28a333b44e6fac67eca Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/127984 Commit-Queue: Liam Appelbe <liama@google.com> Reviewed-by: Régis Crelier <regis@google.com>
This commit is contained in:
committed by
commit-bot@chromium.org
parent
8ad8abfb74
commit
3166b7d976
@@ -552,9 +552,7 @@ gen_snapshot_action("generate_snapshot_bin") {
|
||||
]
|
||||
args = []
|
||||
if (use_nnbd) {
|
||||
# TODO(sigmund): reenable this flag once the CFE can build targets without
|
||||
# issues.
|
||||
# args += [ "--enable-experiment=non-nullable" ]
|
||||
args += [ "--enable-experiment=non-nullable" ]
|
||||
}
|
||||
args += [
|
||||
"--deterministic",
|
||||
|
||||
+1
-3
@@ -153,9 +153,7 @@ template("gen_vm_platform") {
|
||||
"-Ddart.isVM=true",
|
||||
]
|
||||
if (use_nnbd) {
|
||||
# TODO(sigmund): reenable this flag once the CFE can build targets without
|
||||
# issues.
|
||||
# args += [ "--enable-experiment=non-nullable" ]
|
||||
args += [ "--enable-experiment=non-nullable" ]
|
||||
}
|
||||
if (defined(invoker.exclude_source) && invoker.exclude_source) {
|
||||
args += [ "--exclude-source" ]
|
||||
|
||||
@@ -45,4 +45,4 @@ DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)"
|
||||
|
||||
DEV_COMPILER="$DART_ROOT/pkg/dev_compiler/bin/dartdevc.dart"
|
||||
|
||||
exec "$DART" "--packages=$DART_ROOT/.packages" "${EXTRA_VM_OPTIONS[@]}" "$DEV_COMPILER" "$SDK_ARG" "$@"
|
||||
exec "$DART" "--packages=$DART_ROOT/.packages" --enable_experiment=non-nullable "${EXTRA_VM_OPTIONS[@]}" "$DEV_COMPILER" "$SDK_ARG" "$@"
|
||||
|
||||
@@ -35,4 +35,4 @@ if [[ $DART_VM_OPTIONS ]]; then
|
||||
EXTRA_VM_OPTIONS+=("${OPTIONS[@]}")
|
||||
fi
|
||||
|
||||
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "$@"
|
||||
exec "$DART" --enable_experiment=non-nullable "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "$@"
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
import("../build/dart/dart_action.gni")
|
||||
import("../runtime/runtime_args.gni")
|
||||
import("../sdk_args.gni")
|
||||
|
||||
_dart_root = get_path_info("..", "abspath")
|
||||
|
||||
@@ -146,6 +147,10 @@ template("_application_snapshot") {
|
||||
"--snapshot-depfile=$abs_depfile",
|
||||
] + snapshot_vm_args
|
||||
|
||||
if (use_nnbd) {
|
||||
vm_args += [ "--enable-experiment=non-nullable" ]
|
||||
}
|
||||
|
||||
if (dart_snapshot_kind == "kernel") {
|
||||
vm_args += [ "--snapshot-kind=kernel" ]
|
||||
assert(training_args != "", "Ignoring unused argument")
|
||||
|
||||
Reference in New Issue
Block a user