Move DDC to Dart 2 snapshot

This is not yet working.

Change-Id: I86990eb7a8758d9bccee45997f30286d72a8925f
Reviewed-on: https://dart-review.googlesource.com/54532
Commit-Queue: Vijay Menon <vsm@google.com>
Reviewed-by: Jenny Messerly <jmesserly@google.com>
Reviewed-by: Siva Annamalai <asiva@google.com>
This commit is contained in:
Vijay Menon 2018-05-18 19:13:08 +00:00 committed by commit-bot@chromium.org
parent be5b189c19
commit 9f6e8a3a96
7 changed files with 11 additions and 7 deletions

View file

@ -55,7 +55,7 @@ void main(List<String> args) {
ProcessResult runDdc(String command, List<String> args) {
if (debug) {
// Use unbuilt script. This only works from a source checkout.
args.insertAll(0, ['-c', path.join(ddcPath, 'bin', '${command}.dart')]);
args.insertAll(0, ['--preview-dart-2', '-c', path.join(ddcPath, 'bin', '${command}.dart')]);
command = dartBinary;
} else {
// Use built snapshot.

View file

@ -74,7 +74,7 @@ if [ "$KERNEL" = true ]; then
exit 1
fi
dart -c $SDK_DIR/pkg/dev_compiler/bin/dartdevk.dart --modules=node \
$SDK_DIR/sdk/bin/dartdevk --modules=node \
--dart-sdk-summary=$GEN_DIR/kernel/ddc_sdk.dill \
-o $LIBROOT/$BASENAME.js $*
else
@ -86,7 +86,7 @@ else
exit 1
fi
dart -c $SDK_DIR/pkg/dev_compiler/bin/dartdevc.dart --modules=node \
$SDK_DIR/sdk/bin/dartdevc --modules=node \
--library-root=$LIBROOT --dart-sdk-summary=$GEN_DIR/ddc_sdk.sum \
-o $LIBROOT/$BASENAME.js $*
fi

View file

@ -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" "--preview-dart-2" "--packages=$DART_ROOT/.packages" "${EXTRA_VM_OPTIONS[@]}" "$DEV_COMPILER" "$SDK_ARG" "$@"

View file

@ -36,7 +36,7 @@ if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
set DEV_COMPILER=%DART_ROOT%\third_party\pkg\dev_compiler\bin\dartdevc.dart
"%DART%" "--packages=%DART_ROOT%\.packages" %EXTRA_VM_OPTIONS% "DEV_COMPILER%" "%SDK_ARG%" %*
"%DART%" "--preview-dart-2" "--packages=%DART_ROOT%\.packages" %EXTRA_VM_OPTIONS% "DEV_COMPILER%" "%SDK_ARG%" %*
endlocal

View file

@ -28,4 +28,4 @@ SNAPSHOT="$BIN_DIR/snapshots/dartdevc.dart.snapshot"
# We are running the snapshot in the built SDK.
DART="$BIN_DIR/dart"
exec "$DART" "$SNAPSHOT" "$SDK_ARG" "$@"
exec "$DART" "--preview-dart-2" "$SNAPSHOT" "$SDK_ARG" "$@"

View file

@ -22,7 +22,7 @@ if %SDK_DIR:~-1%==\ set SDK_DIR=%SDK_DIR:~0,-1%
set SDK_ARG=--dart-sdk=%SDK_DIR%
"%DART%" "%SNAPSHOT%" "%SDK_ARG%" %*
"%DART%" "--preview-dart-2" "%SNAPSHOT%" "%SDK_ARG%" %*
endlocal

View file

@ -11,6 +11,10 @@ sdk_summary = "$target_gen_dir/ddc_sdk.sum"
sdk_dill = "$target_gen_dir/kernel/ddc_sdk.dill"
application_snapshot("dartdevc") {
vm_args = [
"--preview-dart-2",
]
main_dart = "../../pkg/dev_compiler/bin/dartdevc.dart"
training_args = [