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

Side by Side Diff: compiler/scripts/dartc.sh

Issue 9791073: On dartc invocation, adds -client flag to non-mac builds if not running in batch mode (tests) (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash --posix 1 #!/bin/bash --posix
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 set -e 6 set -e
7 7
8 SCRIPT_DIR=$(dirname $0) 8 SCRIPT_DIR=$(dirname $0)
9 DARTC_HOME=$(dirname $SCRIPT_DIR) 9 DARTC_HOME=$(dirname $SCRIPT_DIR)
10 DARTC_LIBS=$DARTC_HOME/lib 10 DARTC_LIBS=$DARTC_HOME/lib
11 DARTC_SDK=$(dirname $DARTC_HOME)/dart-sdk 11 DARTC_SDK=$(dirname $DARTC_HOME)/dart-sdk
12 12
13 if [ -x /usr/libexec/java_home ]; then 13 if [ -x /usr/libexec/java_home ]; then
14 export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+') 14 export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+')
15 fi 15 fi
16 16
17 EXTRA_JVMARGS="-Xss2M " 17 EXTRA_JVMARGS="-Xss2M "
18 OS=`uname | tr [A-Z] [a-z]` 18 OS=`uname | tr [A-Z] [a-z]`
19 if [ "$OS" == "darwin" ] ; then 19 if [ "$OS" == "darwin" ] ; then
20 # Bump up the heap on Mac VMs, some of which default to 128M or less. 20 # Bump up the heap on Mac VMs, some of which default to 128M or less.
21 # Users can specify DART_JVMARGS in the environment to override 21 # Users can specify DART_JVMARGS in the environment to override
22 # this setting. Force to 32 bit client vm. 64 bit and server VM make for 22 # this setting. Force to 32 bit client vm. 64 bit and server VM make for
23 # poor performance. 23 # poor performance.
24 EXTRA_JVMARGS+="-Xmx256M -client -d32" 24 EXTRA_JVMARGS+=" -Xmx256M -client -d32 "
25 else
26 # On other architectures
27 # -batch invocations will do better with a server vm
28 # invocations for analyzing a single file do better with a client vm
29 FOUND_BATCH=0
30 for ARG in "$@"
31 do
32 case $ARG in
33 -batch|--batch)
34 FOUND_BATCH=1
35 ;;
36 *)
37 ;;
38 esac
39 done
40 if [ $FOUND_BATCH = 0 ] ; then
41 EXTRA_JVMARGS+=" -client "
42 fi
25 fi 43 fi
26 44
27 exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \ 45 exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \
28 com.google.dart.compiler.DartCompiler --dart-sdk ${DARTC_SDK} $@ 46 com.google.dart.compiler.DartCompiler --dart-sdk ${DARTC_SDK} $@
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698