Index: sdk/bin/dart2js |
diff --git a/sdk/bin/dart2js b/sdk/bin/dart2js |
index 79a857be83efe500109c4f7c760fa2a9c008f2f9..57c9d7f157e4a7dca8b018266f7288e2b86fbb91 100755 |
--- a/sdk/bin/dart2js |
+++ b/sdk/bin/dart2js |
@@ -20,8 +20,6 @@ BIN_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)" |
SDK_DIR="$(cd "${BIN_DIR}/.." ; pwd -P)" |
-DART2JS="$SDK_DIR/lib/_internal/compiler/implementation/dart2js.dart" |
- |
DART="$BIN_DIR/dart" |
SNAPSHOT_DIR="$BIN_DIR/snapshots" |
@@ -63,8 +61,25 @@ if [[ $DART_VM_OPTIONS ]]; then |
EXTRA_VM_OPTIONS+=("${OPTIONS[@]}") |
fi |
+DART_ROOT="$(cd "${SDK_DIR}/.." ; pwd -P)" |
+ |
+DART2JS="$DART_ROOT/pkg/compiler/lib/src/dart2js.dart" |
+ |
+if [ -z "$DART_CONFIGURATION" ]; |
+then |
+ DART_CONFIGURATION="ReleaseIA32" |
+fi |
+ |
+if [[ `uname` == 'Darwin' ]]; then |
+ BUILD_DIR="$DART_ROOT/xcodebuild/$DART_CONFIGURATION" |
+else |
+ BUILD_DIR="$DART_ROOT/out/$DART_CONFIGURATION" |
+fi |
+ |
+PACKAGE_ROOT="$BUILD_DIR/packages/" |
+ |
if test -f "$SNAPSHOT"; then |
Paul Berry
2014/10/29 14:16:52
Since you've added dart2js_sdk, this script will o
Johnni Winther
2014/10/30 10:04:31
Done.
|
exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$SNAPSHOT" "${EXTRA_OPTIONS[@]}" "$@" |
else |
- exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@" |
+ exec "$DART" "${EXTRA_VM_OPTIONS[@]}" "--package-root=$PACKAGE_ROOT" "$DART2JS" "${EXTRA_OPTIONS[@]}" "$@" |
fi |