| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 3 # for details. All rights reserved. Use of this source code is governed by a | 3 # for details. All rights reserved. Use of this source code is governed by a |
| 4 # BSD-style license that can be found in the LICENSE file. | 4 # BSD-style license that can be found in the LICENSE file. |
| 5 | 5 |
| 6 case $(uname -s) in | 6 case $(uname -s) in |
| 7 *Linux*|*linux*) | 7 *Linux*|*linux*) |
| 8 OS="linux" | 8 OS="linux" |
| 9 ;; | 9 ;; |
| 10 Darwin) | 10 Darwin) |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 DART_SCRIPT_NAME=${DART_SCRIPT_NAME:-$(basename $0)} | 22 DART_SCRIPT_NAME=${DART_SCRIPT_NAME:-$(basename $0)} |
| 23 | 23 |
| 24 if [ -x /usr/libexec/java_home ]; then | 24 if [ -x /usr/libexec/java_home ]; then |
| 25 export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+') | 25 export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+') |
| 26 fi | 26 fi |
| 27 | 27 |
| 28 # Limit heap in order to detect any memory issues. | 28 # Limit heap in order to detect any memory issues. |
| 29 # On some system, the heap dynamically sizes to > 1GB. | 29 # On some system, the heap dynamically sizes to > 1GB. |
| 30 # Users can specify DART_JVMARGS in the environment to override | 30 # Users can specify DART_JVMARGS in the environment to override |
| 31 # these settings. | 31 # these settings. |
| 32 EXTRA_JVMARGS=-Xmx196M | 32 EXTRA_JVMARGS="-Xmx196M -Xss2M" |
| 33 if [ "$OS" == "mac" ] ; then | |
| 34 # Bump up the stack size for mac clients | |
| 35 EXTRA_JVMARGS+=" -Xss2M" | |
| 36 fi | |
| 37 | |
| 38 | |
| 39 | 33 |
| 40 exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -Dcom.google.dart.runner.d8="$D8_EXEC
" \ | 34 exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -Dcom.google.dart.runner.d8="$D8_EXEC
" \ |
| 41 -Dcom.google.dart.runner.progname="$DART_SCRIPT_NAME" \ | 35 -Dcom.google.dart.runner.progname="$DART_SCRIPT_NAME" \ |
| 42 -classpath "@CLASSPATH@" \ | 36 -classpath "@CLASSPATH@" \ |
| 43 com.google.dart.runner.DartRunner $@ | 37 com.google.dart.runner.DartRunner $@ |
| OLD | NEW |