-
Notifications
You must be signed in to change notification settings - Fork 1
/
z
executable file
·47 lines (44 loc) · 1.14 KB
/
z
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
java_options=(
-Dtruffle.class.path.append=language/target/graaleneyj.jar
-Dorg.graalvm.language.z.home="$PWD"
-cp launcher/target/launcher-0.0.1-SNAPSHOT.jar:fs/target/fs-0.0.1-SNAPSHOT.jar
)
infile=/dev/stdin
for arg; do
case $arg in
--dump)
java_options+=(
-Dpolyglot.engine.AllowExperimentalOptions=true
-Dgraal.Dump=Truffle:1
-Dpolyglot.engine.BackgroundCompilation=false
-Dpolyglot.engine.TraceCompilation=true
-Dpolyglot.engine.TraceCompilationDetails=true
)
shift
;;
--enable-assertions)
java_options+=(-ea)
shift
;;
--)
shift
break
;;
-)
break
;;
-*)
printf >&2 '%s: unknown option: %s\n' "$0" "$arg"
exit 1
;;
*)
break
;;
esac
done
exec \
"${JAVA_HOME:?not set, must be set}/bin/java" \
"${java_options[@]}" \
de.lucaswerkmeister.graaleneyj.launcher.ZMain \
"$@"