OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 set -e | 2 set -e |
3 # switch to the root directory of dev_compiler | 3 # switch to the root directory of dev_compiler |
4 cd $( dirname "${BASH_SOURCE[0]}" )/.. | 4 cd $( dirname "${BASH_SOURCE[0]}" )/.. |
5 | 5 |
6 echo "*** Patching SDK" | 6 echo "*** Patching SDK" |
7 rm -r tool/generated_sdk || true | 7 rm -r tool/generated_sdk || true |
8 dart -c tool/patch_sdk.dart tool/input_sdk tool/generated_sdk | 8 dart -c tool/patch_sdk.dart tool/input_sdk tool/generated_sdk |
9 | 9 |
10 echo "*** Compiling SDK to JavaScript" | 10 echo "*** Compiling SDK to JavaScript" |
11 if [[ -d lib/runtime/dart ]] ; then | 11 if [[ -d lib/runtime/dart ]] ; then |
12 rm -r lib/runtime/dart | 12 rm -r lib/runtime/dart |
13 fi | 13 fi |
14 | 14 |
15 # TODO(jmesserly): this builds dart:js, which pulls in dart:core and many others | 15 # TODO(jmesserly): this builds dart:js, which pulls in dart:core and many others |
16 # transitively. Ideally we could pass them explicitly, though: | 16 # transitively. Ideally we could pass them explicitly, though: |
17 # https://github.com/dart-lang/dev_compiler/issues/219 | 17 # https://github.com/dart-lang/dev_compiler/issues/219 |
18 dart -c bin/devc.dart --no-source-maps --sdk-check --force-compile -l warning \ | 18 dart -c bin/devc.dart --no-source-maps --arrow-fn-bind-this --sdk-check \ |
19 --dart-sdk tool/generated_sdk -o lib/runtime/ dart:mirrors \ | 19 --force-compile -l warning --dart-sdk tool/generated_sdk -o lib/runtime/ \ |
| 20 dart:js dart:mirrors \ |
20 > tool/sdk_expected_errors.txt || true | 21 > tool/sdk_expected_errors.txt || true |
21 | 22 |
22 if [[ ! -f lib/runtime/dart/core.js ]] ; then | 23 if [[ ! -f lib/runtime/dart/core.js ]] ; then |
23 echo 'core.js not found, assuming build failed.' | 24 echo 'core.js not found, assuming build failed.' |
24 echo './tool/build_sdk.sh can be run to reproduce this.' | 25 echo './tool/build_sdk.sh can be run to reproduce this.' |
25 exit 1 | 26 exit 1 |
26 fi | 27 fi |
OLD | NEW |