-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathmake-compiler
executable file
·35 lines (27 loc) · 1.03 KB
/
make-compiler
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
#!/usr/bin/env bash
# Build the Silver compiler.
# Note that this does not rebuild the standard libraries or the runtime; use make-all for that.
set -euo pipefail
silver_version=`git describe --tags`
echo "Build version $silver_version"
export SILVER_HOME=$PWD
JVM_ARGS=(-Xss20M -Xmx6500M -jar ../jars/silver.compiler.composed.Default.jar --no-stdlib --include-jar ../jars/CopperCompiler.jar --include-jar ../jars/commonmark-0.17.1.jar --relative-jar "$@" --jar-impl-version "$silver_version")
export GRAMMAR_PATH="../grammars"
export ANT_OPTS=-Xss10M
mkdir -p build
cd build
for lib in core util langutil rewrite regex; do
# Use the jars in build/ if they exist:
if [ -f "silver.$lib.jar" ]; then
export GRAMMAR_PATH="$GRAMMAR_PATH:silver.$lib.jar"
else
export GRAMMAR_PATH="$GRAMMAR_PATH:../jars/silver.$lib.jar"
fi
done
echo "=== BUILD COMPILER ==="
time java "${JVM_ARGS[@]}" silver:compiler:composed:Default
ant
if [ -z "${NOINSTALL:-}" ]; then
echo "=== INSTALL NEW JARS ==="
mv ./*.jar ../jars
fi