Files
sdk/pkg/dev_compiler/tool/build_sdk.sh
T
Jennifer Messerly fe294f3753 unfork DDC's copy of most SDK libraries
There's some changes in strong mode errors we may want to follow up on.

Unforks the following: async, collection, convert, core, developer, internal, io, isolate, math, mirrors.

Does not unfork: html, indexed_db, js, js_util, svg, typed_data, web_audio, web_gl, web_sql.

R=vsm@google.com

Review-Url: https://codereview.chromium.org/2698353003 .
2017-02-28 17:10:52 -08:00

37 lines
986 B
Bash
Executable File

#!/bin/bash
set -e
# switch to the root directory of dev_compiler
cd $( dirname "${BASH_SOURCE[0]}" )/..
echo "*** Patching SDK"
{ # Try
dart -c tool/patch_sdk.dart ../.. tool/input_sdk gen/patched_sdk \
> tool/sdk_expected_errors.txt
} || { # Catch
# Show errors if the sdk didn't compile.
cat tool/sdk_expected_errors.txt
exit 1
}
echo "*** Compiling SDK to JavaScript"
{ # Try
# TODO(jmesserly): break out dart:html & friends into a module.
dart -c tool/build_sdk.dart \
--dart-sdk gen/patched_sdk \
--dart-sdk-summary=build \
--summary-out lib/sdk/ddc_sdk.sum \
--modules=amd \
-o lib/js/amd/dart_sdk.js \
--modules=es6 \
-o lib/js/es6/dart_sdk.js \
--modules=common \
-o lib/js/common/dart_sdk.js \
--modules=legacy \
-o lib/js/legacy/dart_sdk.js \
"$@" > tool/sdk_expected_errors.txt
} || { # Catch
# Show errors if the sdk didn't compile.
cat tool/sdk_expected_errors.txt
exit 1
}