mirror of
https://github.com/dart-lang/sdk
synced 2024-11-02 15:01:30 +00:00
Add wrapper shell script to invoke dartk with checked-in binary
R=vegorov@google.com Review URL: https://codereview.chromium.org/2516433004 .
This commit is contained in:
parent
30e01bcd67
commit
13f7e93c7e
2 changed files with 20 additions and 1 deletions
19
tools/dartk_wrappers/dartk
Executable file
19
tools/dartk_wrappers/dartk
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env bash
|
||||
# Copyright (c) 2016, 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.
|
||||
|
||||
# Unlike $0, $BASH_SOURCE points to the absolute path of this file.
|
||||
PROG_NAME="$BASH_SOURCE"
|
||||
WRAPPERS_DIR="$(cd "${PROG_NAME%/*}" ; pwd -P)"
|
||||
DART_ROOT="$(cd "${WRAPPERS_DIR}/../.." ; pwd -P)"
|
||||
DARTK="$DART_ROOT/third_party/pkg/kernel/bin/dartk.dart"
|
||||
|
||||
if [[ `uname` == 'Darwin' ]];
|
||||
then
|
||||
DART="$DART_ROOT/tools/sdks/mac/dart-sdk/bin/dart"
|
||||
else
|
||||
DART="$DART_ROOT/tools/sdks/linux/dart-sdk/bin/dart"
|
||||
fi
|
||||
|
||||
exec "$DART" "$DARTK" "$@"
|
|
@ -217,7 +217,7 @@ class DartKCompilerConfiguration extends CompilerConfiguration {
|
|||
|
||||
@override
|
||||
String computeCompilerPath(String buildDir) {
|
||||
return 'third_party/pkg/kernel/bin/dartk.dart';
|
||||
return 'tools/dartk_wrappers/dartk$executableScriptSuffix';
|
||||
}
|
||||
|
||||
CompilationCommand computeCompilationCommand(
|
||||
|
|
Loading…
Reference in a new issue