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

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

Issue 10540074: The dart_analyzer launch script was a bit tangled up. It needs to be able (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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) 2012, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2012, 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 DART_ANALYZER_HOME=$(dirname $SCRIPT_DIR) 9 DART_ANALYZER_HOME=$(dirname $SCRIPT_DIR)
10 10
(...skipping 15 matching lines...) Expand all
26 26
27 DART_SDK="" 27 DART_SDK=""
28 if [ $FOUND_SDK = 0 ] ; then 28 if [ $FOUND_SDK = 0 ] ; then
29 if [ -f $DART_ANALYZER_HOME/lib/core/core_runtime.dart ] ; then 29 if [ -f $DART_ANALYZER_HOME/lib/core/core_runtime.dart ] ; then
30 DART_SDK="--dart-sdk $DART_ANALYZER_HOME" 30 DART_SDK="--dart-sdk $DART_ANALYZER_HOME"
31 else 31 else
32 DART_SDK_HOME=$(dirname $DART_ANALYZER_HOME)/dart-sdk 32 DART_SDK_HOME=$(dirname $DART_ANALYZER_HOME)/dart-sdk
33 if [ -d $DART_SDK_HOME ] ; then 33 if [ -d $DART_SDK_HOME ] ; then
34 DART_SDK="--dart-sdk $DART_SDK_HOME" 34 DART_SDK="--dart-sdk $DART_SDK_HOME"
35 else 35 else
36 echo "Couldn't find Dart SDK. Specify with --dart-sdk cmdline argument" 36 DART_SDK_HOME=$(dirname $DART_SDK_HOME)/dart-sdk
37 if [ -d $DART_SDK_HOME ] ; then
38 DART_SDK="--dart-sdk $DART_SDK_HOME"
39 else
40 echo "Couldn't find Dart SDK. Specify with --dart-sdk cmdline argument"
41 fi
37 fi 42 fi
38 fi 43 fi
39 fi 44 fi
40 45
41 DART_ANALYZER_LIBS=$DART_ANALYZER_HOME/util/analyzer 46 if [ -f $DART_SDK_HOME/util/analyzer/dart_analyzer.jar ] ; then
47 DART_ANALYZER_LIBS=$DART_SDK_HOME/util/analyzer
48 elif [ -f $DART_ANALYZER_HOME/util/analyzer/dart_analyzer.jar ] ; then
49 DART_ANALYZER_LIBS=$DART_ANALYZER_HOME/util/analyzer
50 else
51 echo "Configuration problem. Couldn't find dart_analyzer.jar."
52 exit 1
53 fi
42 54
43 if [ -x /usr/libexec/java_home ]; then 55 if [ -x /usr/libexec/java_home ]; then
44 export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+') 56 export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+')
45 fi 57 fi
46 58
47 EXTRA_JVMARGS="-Xss2M " 59 EXTRA_JVMARGS="-Xss2M "
48 OS=`uname | tr [A-Z] [a-z]` 60 OS=`uname | tr [A-Z] [a-z]`
49 if [ "$OS" == "darwin" ] ; then 61 if [ "$OS" == "darwin" ] ; then
50 # Bump up the heap on Mac VMs, some of which default to 128M or less. 62 # Bump up the heap on Mac VMs, some of which default to 128M or less.
51 # Users can specify DART_JVMARGS in the environment to override 63 # Users can specify DART_JVMARGS in the environment to override
52 # this setting. Force to 32 bit client vm. 64 bit and server VM make for 64 # this setting. Force to 32 bit client vm. 64 bit and server VM make for
53 # poor performance. 65 # poor performance.
54 EXTRA_JVMARGS+=" -Xmx256M -client -d32 " 66 EXTRA_JVMARGS+=" -Xmx256M -client -d32 "
55 else 67 else
56 # On other architectures 68 # On other architectures
57 # -batch invocations will do better with a server vm 69 # -batch invocations will do better with a server vm
58 # invocations for analyzing a single file do better with a client vm 70 # invocations for analyzing a single file do better with a client vm
59 if [ $FOUND_BATCH = 0 ] ; then 71 if [ $FOUND_BATCH = 0 ] ; then
60 EXTRA_JVMARGS+=" -client " 72 EXTRA_JVMARGS+=" -client "
61 fi 73 fi
62 fi 74 fi
63 75
64 exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \ 76 exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \
65 com.google.dart.compiler.DartCompiler ${DART_SDK} $@ 77 com.google.dart.compiler.DartCompiler ${DART_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