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

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

Issue 9950043: Revert "Renamed the 'dartc' launch script to 'dart_analyzer' and adds it to dart-sdk" (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 | « compiler/scripts/compiler_series_test.sh ('k') | compiler/scripts/dartc.sh » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash --posix
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
4 # BSD-style license that can be found in the LICENSE file.
5
6 set -e
7
8 SCRIPT_DIR=$(dirname $0)
9 DART_ANALYZER_HOME=$(dirname $SCRIPT_DIR)
10 DART_ANALYZER_LIBS=$DART_ANALYZER_HOME/util/analyzer
11
12 FOUND_BATCH=0
13 FOUND_SDK=0
14 for ARG in "$@"
15 do
16 case $ARG in
17 -batch|--batch)
18 FOUND_BATCH=1
19 ;;
20 --dart-sdk)
21 FOUND_SDK=1
22 ;;
23 *)
24 ;;
25 esac
26 done
27
28 DART_SDK=""
29 if [ $FOUND_SDK = 0 ] ; then
30 if [ -f $DART_ANALYZER_HOME/lib/core/core_runtime.dart ] ; then
31 DART_SDK="--dart-sdk $DART_ANALYZER_HOME"
32 else
33 DEV_SDKDIR=$(dirname $DART_ANALYZER_HOME)/dart-sdk
34 if [ -d $DEV_SDKDIR ] ; then
35 DART_SDK="--dart-sdk $DEV_SDKDIR"
36 else
37 echo "Couldn't find Dart SDK. Specify with --dart-sdk cmdline argument"
38 fi
39 fi
40 fi
41
42
43
44 if [ -x /usr/libexec/java_home ]; then
45 export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+')
46 fi
47
48 EXTRA_JVMARGS="-Xss2M "
49 OS=`uname | tr [A-Z] [a-z]`
50 if [ "$OS" == "darwin" ] ; then
51 # Bump up the heap on Mac VMs, some of which default to 128M or less.
52 # Users can specify DART_JVMARGS in the environment to override
53 # this setting. Force to 32 bit client vm. 64 bit and server VM make for
54 # poor performance.
55 EXTRA_JVMARGS+=" -Xmx256M -client -d32 "
56 else
57 # On other architectures
58 # -batch invocations will do better with a server vm
59 # invocations for analyzing a single file do better with a client vm
60 if [ $FOUND_BATCH = 0 ] ; then
61 EXTRA_JVMARGS+=" -client "
62 fi
63 fi
64
65 exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \
66 com.google.dart.compiler.DartCompiler ${DART_SDK} $@
OLDNEW
« no previous file with comments | « compiler/scripts/compiler_series_test.sh ('k') | compiler/scripts/dartc.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698