Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Unified Diff: tool/build_sdk.sh

Issue 1020043002: Replace dart_core.js with actual compiled SDK (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: merge Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/test.sh ('k') | tool/input_sdk/lib/_internal/pub/asset/dart/core_stubs/dart_html.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tool/build_sdk.sh
diff --git a/tool/build_sdk.sh b/tool/build_sdk.sh
new file mode 100755
index 0000000000000000000000000000000000000000..eebaf22d905fd5766c6aca33b360d42a48bc1654
--- /dev/null
+++ b/tool/build_sdk.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+set -e
+# switch to the root directory of dev_compiler
+cd $( dirname "${BASH_SOURCE[0]}" )/..
+
+echo "*** Patching SDK"
+rm -r test/generated_sdk || true
+dart -c tool/patch_sdk.dart tool/input_sdk test/generated_sdk
+
+echo "*** Compiling SDK to JavaScript"
+if [[ -d lib/runtime/dart ]] ; then
+ rm -r lib/runtime/dart
+fi
+
+# TODO(jmesserly): for now we're suppressing errors in SDK compilation
+dart -c bin/devc.dart --no-source-maps --sdk-check --force-compile -l shout \
+ --dart-sdk test/generated_sdk -o lib/runtime/ dart:core || true
+
+if [[ ! -f lib/runtime/dart/core.js ]] ; then
+ echo 'core.js not found, assuming build failed.'
+ echo './tool/build_sdk.sh can be run to reproduce this.'
+ exit 1
+fi
« no previous file with comments | « test/test.sh ('k') | tool/input_sdk/lib/_internal/pub/asset/dart/core_stubs/dart_html.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698