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

Unified Diff: sdk/bin/dart2js

Issue 23618063: Add support for passing in vm options to the dart2js scripts. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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 | « no previous file | sdk/bin/dart2js.bat » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/bin/dart2js
===================================================================
--- sdk/bin/dart2js (revision 27645)
+++ sdk/bin/dart2js (working copy)
@@ -33,7 +33,7 @@
# Stdout is a terminal.
if test 8 -le `tput colors`; then
# Stdout has at least 8 colors, so enable colors.
- EXTRA_OPTIONS[${#EXTRA_OPTIONS[@]}]='--enable-diagnostic-colors'
+ EXTRA_OPTIONS+=('--enable-diagnostic-colors')
fi
fi
@@ -41,7 +41,7 @@
declare -a EXTRA_VM_OPTIONS
if test -f "$SNAPSHOT"; then
- EXTRA_OPTIONS[${#EXTRA_OPTIONS[@]}]="--library-root=$SDK_DIR"
+ EXTRA_OPTIONS+=("--library-root=$SDK_DIR")
fi
# Tell the VM to grow the heap more aggressively. This should only
@@ -52,10 +52,16 @@
case $0 in
*_developer)
- EXTRA_VM_OPTIONS[${#EXTRA_VM_OPTIONS[@]}]='--checked'
+ EXTRA_VM_OPTIONS+=('--checked')
;;
esac
+# We allow extra vm options to be passed in through an environment variable.
+if [[ $DART_VM_OPTIONS ]]; then
+ read -a OPTIONS <<< "$DART_VM_OPTIONS"
+ EXTRA_VM_OPTIONS+=("${OPTIONS[@]}")
+fi
+
if test -f "$SNAPSHOT"; then
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "${EXTRA_OPTIONS[@]}" "$@"
else
« no previous file with comments | « no previous file | sdk/bin/dart2js.bat » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698