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

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

Issue 10091038: 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/dartc_metrics.sh ('k') | compiler/scripts/dartc_wrapper.py » ('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 #
3 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
4 # for details. All rights reserved. Use of this source code is governed by a
5 # BSD-style license that can be found in the LICENSE file.
6
7
8 # Prevent problems where the caller has exported CLASSPATH, causing our
9 # computed value to be copied into the environment and double-counted
10 # against the argv limit.
11 unset CLASSPATH
12
13 # Figure out where the dartc home is
14 SCRIPT_DIR=`dirname $0`
15 DARTC_HOME=`cd $SCRIPT_DIR; pwd`
16 DARTC_LIBS=$DIST_DIR/lib
17 DIST_DIR=$DARTC_HOME/compiler
18
19 DARTC_FLAGS=""
20
21 # Make it easy to insert 'set -x' or similar commands when debugging problems wi th this script.
22 eval "$JAVA_STUB_DEBUG"
23
24 JVM_FLAGS_CMDLINE=""
25
26 while [ ! -z "$1" ]; do
27 case "$1" in
28 --prof)
29 # Ensure the preset -optimize flag is gone when profiling.
30 DARTC_FLAGS="--prof"
31 shift ;;
32 --debug)
33 JVM_DEBUG_PORT=${DEFAULT_JVM_DEBUG_PORT:-"5005"}
34 shift ;;
35 --debug=*)
36 JVM_DEBUG_PORT=${1/--debug=/}
37 shift ;;
38 --jvm_flags=*)
39 JVM_FLAGS_CMDLINE="$JVM_FLAGS_CMDLINE ${1/--jvm_flags=/}"
40 shift ;;
41 *) break ;;
42 esac
43 done
44
45 if [ "$JVM_DEBUG_PORT" != "" ]; then
46 JVM_DEBUG_SUSPEND=${DEFAULT_JVM_DEBUG_SUSPEND:-"y"}
47 JVM_DEBUG_FLAGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=${JVM_DEB UG_SUSPEND},address=${JVM_DEBUG_PORT}"
48 fi
49
50 shopt -s execfail # Return control to this script if exec fails.
51 exec $JAVABIN -ea -classpath @CLASSPATH@ \
52 ${JVM_DEBUG_FLAGS} \
53 ${JVM_FLAGS} \
54 ${JVM_FLAGS_CMDLINE} \
55 com.google.dart.compiler.DartCompiler \
56 $DARTC_FLAGS \
57 "$@"
58
59 echo "ERROR: couldn't exec ${JAVABIN}." 1>&2
60
61 exit 1
OLDNEW
« no previous file with comments | « compiler/scripts/dartc_metrics.sh ('k') | compiler/scripts/dartc_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698