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

Side by Side Diff: pkg/front_end/tool/fasta

Issue 2903593002: Ensure DART_CONFIGURATION is exported and don't run code in checked mode. (Closed)
Patch Set: Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 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. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 set -e 6 set -e
7 7
8 REPO_DIR="$(git rev-parse --show-toplevel)" 8 REPO_DIR="$(git rev-parse --show-toplevel)"
9 9
10 # TODO(ahe): We currently rely on the Dart VM wrapper script to define
11 # DART_CONFIGURATION for locating platform.dill.
12 DART_VM="${REPO_DIR}/sdk/bin/dart" 10 DART_VM="${REPO_DIR}/sdk/bin/dart"
13 11
14 TOOL_DIR="${REPO_DIR}/pkg/front_end/tool/_fasta" 12 TOOL_DIR="${REPO_DIR}/pkg/front_end/tool/_fasta"
15 13
16 KERNEL_BIN="${REPO_DIR}/pkg/kernel/bin" 14 KERNEL_BIN="${REPO_DIR}/pkg/kernel/bin"
17 15
18 function stop { 16 function stop {
19 echo "$@" >&2 17 echo "$@" >&2
20 exit 1 18 exit 1
21 } 19 }
22 20
23 DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64} 21 export DART_CONFIGURATION=${DART_CONFIGURATION:-ReleaseX64}
24 22
25 case "${1//_/-}" in 23 case "${1//_/-}" in
26 abcompile) SCRIPT="${TOOL_DIR}/abcompile.dart";; 24 abcompile) SCRIPT="${TOOL_DIR}/abcompile.dart";;
27 analyzer-compile) SCRIPT="${TOOL_DIR}/analyzer_compile.dart";; 25 analyzer-compile) SCRIPT="${TOOL_DIR}/analyzer_compile.dart";;
28 compile) SCRIPT="${TOOL_DIR}/compile.dart";; 26 compile) SCRIPT="${TOOL_DIR}/compile.dart";;
29 compile-platform) SCRIPT="${TOOL_DIR}/compile_platform.dart";; 27 compile-platform) SCRIPT="${TOOL_DIR}/compile_platform.dart";;
30 compile-platform-dartk) 28 compile-platform-dartk)
31 SCRIPT="${TOOL_DIR}/compile_platform_dartk.dart" 29 SCRIPT="${TOOL_DIR}/compile_platform_dartk.dart"
32 if [ "$#" != "2" ]; then 30 if [ "$#" != "2" ]; then
33 stop "Usage: $1 file" 31 stop "Usage: $1 file"
(...skipping 13 matching lines...) Expand all
47 fi 45 fi
48 if [ "$#" != "3" ]; then 46 if [ "$#" != "3" ]; then
49 stop "Usage: $1 dillfile [output]" 47 stop "Usage: $1 dillfile [output]"
50 fi 48 fi
51 ;; 49 ;;
52 kernel-service) 50 kernel-service)
53 shift 51 shift
54 PATCHED_SDK_DIR=$( 52 PATCHED_SDK_DIR=$(
55 ls -d {xcodebuild,out}/${DART_CONFIGURATION}/patched_sdk 2>/dev/null \ 53 ls -d {xcodebuild,out}/${DART_CONFIGURATION}/patched_sdk 2>/dev/null \
56 | head -1) 54 | head -1)
57 exec "${DART_VM}" -c -DDFE_VERBOSE=true \ 55 exec "${DART_VM}" -DDFE_VERBOSE=true \
58 --platform=${PATCHED_SDK_DIR}/platform.dill \ 56 --platform=${PATCHED_SDK_DIR}/platform.dill \
59 --dfe="${REPO_DIR}/utils/kernel-service/kernel-service.dart" "$@" 57 --dfe="${REPO_DIR}/utils/kernel-service/kernel-service.dart" "$@"
60 ;; 58 ;;
61 testing) 59 testing)
62 SCRIPT="${REPO_DIR}/pkg/testing/bin/testing.dart" 60 SCRIPT="${REPO_DIR}/pkg/testing/bin/testing.dart"
63 set -- "$@" "--config=${REPO_DIR}/pkg/front_end/test/fasta/testing.json" 61 set -- "$@" "--config=${REPO_DIR}/pkg/front_end/test/fasta/testing.json"
64 ;; 62 ;;
65 generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";; 63 generate-messages) SCRIPT="${TOOL_DIR}/generate_messages.dart";;
66 *) 64 *)
67 stop "'$1' isn't a valid subcommand." 65 stop "'$1' isn't a valid subcommand."
68 ;; 66 ;;
69 esac 67 esac
70 68
71 shift 69 shift
72 70
73 exec "${DART_VM}" -c "${SCRIPT}" "$@" 71 exec "${DART_VM}" -c "${SCRIPT}" "$@"
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698