mirror of
https://github.com/dart-lang/sdk
synced 2024-10-14 15:21:54 +00:00
Add support for passing in vm options to the dart2js scripts.
R=ahe@google.com Review URL: https://codereview.chromium.org//23618063 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@27690 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
parent
7d44a6cead
commit
c0c636652c
|
@ -33,7 +33,7 @@ if test -t 1; then
|
|||
# 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 @@ unset EXTRA_VM_OPTIONS
|
|||
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 @@ EXTRA_VM_OPTIONS[${#EXTRA_VM_OPTIONS[@]}]='--heap_growth_rate=512'
|
|||
|
||||
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
|
||||
|
|
|
@ -35,6 +35,11 @@ if exist "%SNAPSHOT%" (
|
|||
rem See comments regarding options below in dart2js shell script.
|
||||
set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% --heap_growth_rate=512
|
||||
|
||||
rem We allow extra vm options to be passed in through an environment variable.
|
||||
if not _%DART_VM_OPTIONS%_ == __ (
|
||||
set EXTRA_VM_OPTIONS=%EXTRA_VM_OPTIONS% %DART_VM_OPTIONS%
|
||||
)
|
||||
|
||||
if exist "%SNAPSHOT%" (
|
||||
"%DART%" %EXTRA_VM_OPTIONS% "%SNAPSHOT%" %EXTRA_OPTIONS% %*
|
||||
) else (
|
||||
|
|
Loading…
Reference in a new issue