4ce241dc76
This reverts r6629. Breaks the windows editor build in a different way. Review URL: https://chromiumcodereview.appspot.com//10091038 git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@6633 260f80e4-7a28-3924-810f-c04153c831b5
47 lines
1.3 KiB
Bash
Executable File
47 lines
1.3 KiB
Bash
Executable File
#!/bin/bash --posix
|
|
# Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
|
|
# for details. All rights reserved. Use of this source code is governed by a
|
|
# BSD-style license that can be found in the LICENSE file.
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR=$(dirname $0)
|
|
DARTC_HOME=$(dirname $SCRIPT_DIR)
|
|
DARTC_LIBS=$DARTC_HOME/lib
|
|
DARTC_SDK=$(dirname $DARTC_HOME)/dart-sdk
|
|
|
|
if [ -x /usr/libexec/java_home ]; then
|
|
export JAVA_HOME=$(/usr/libexec/java_home -v '1.6+')
|
|
fi
|
|
|
|
EXTRA_JVMARGS="-Xss2M "
|
|
OS=`uname | tr [A-Z] [a-z]`
|
|
if [ "$OS" == "darwin" ] ; then
|
|
# Bump up the heap on Mac VMs, some of which default to 128M or less.
|
|
# Users can specify DART_JVMARGS in the environment to override
|
|
# this setting. Force to 32 bit client vm. 64 bit and server VM make for
|
|
# poor performance.
|
|
EXTRA_JVMARGS+=" -Xmx256M -client -d32 "
|
|
else
|
|
# On other architectures
|
|
# -batch invocations will do better with a server vm
|
|
# invocations for analyzing a single file do better with a client vm
|
|
FOUND_BATCH=0
|
|
for ARG in "$@"
|
|
do
|
|
case $ARG in
|
|
-batch|--batch)
|
|
FOUND_BATCH=1
|
|
;;
|
|
*)
|
|
;;
|
|
esac
|
|
done
|
|
if [ $FOUND_BATCH = 0 ] ; then
|
|
EXTRA_JVMARGS+=" -client "
|
|
fi
|
|
fi
|
|
|
|
exec java $EXTRA_JVMARGS $DART_JVMARGS -ea -classpath "@CLASSPATH@" \
|
|
com.google.dart.compiler.DartCompiler --dart-sdk ${DARTC_SDK} $@
|