This repository has been archived by the owner on Mar 22, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aot.sh
executable file
·49 lines (35 loc) · 2.71 KB
/
aot.sh
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
48
49
#!/bin/sh
GRAALVM_DIR=/Users/guidochari/Documents/Projects/graalvm-0.24
JVMCI_DIR=${GRAALVM_DIR}/jdk/jre/lib/jvmci
LIB=${GRAALVM_DIR}/lib
GRAAL=${LIB}/graal
SOM_DIR=/Users/guidochari/Documents/Projects/TruffleMATE
TRUFFLE_DIR=${SOM_DIR}/libs/truffle/truffle/mxbuild/dists
SDK_DIR=${SOM_DIR}/libs/truffle/sdk/mxbuild/dists/
CLASSPATH=${JVMCI_DIR}/jvmci-api.jar:${JVMCI_DIR}/jvmci-hotspot.jar:${GRAAL}/enterprise-graal.jar:${SDK_DIR}/graal-sdk.jar:${GRAAL}/graal.jar:${TRUFFLE_DIR}/truffle-api.jar:${TRUFFLE_DIR}/truffle-debug.jar:${LIB}/truffle/truffle-om.jar:${LIB}/svm/svm.jar:${LIB}/svm/svm-api.jar:${LIB}/svm/objectfile.jar:${LIB}/svm/lib/gson-2.2.4.jar
# CLASSPATH=${JVMCI_DIR}/jvmci-api.jar:${JVMCI_DIR}/jvmci-hotspot.jar:${GRAAL}/enterprise-graal.jar:${GRAAL}/graal.jar:${TRUFFLE_DIR}/truffle-api.jar:${TRUFFLE_DIR}/truffle-debug.jar:${LIB}/truffle/truffle-om.jar:${LIB}/svm/svm.jar:${LIB}/svm/svm-api.jar:${LIB}/svm/objectfile.jar:${LIB}/svm/lib/gson-2.2.4.jar:${GRAALVM_DIR}/language/R/jline.jar
${GRAALVM_DIR}/jdk/bin/java \
-server -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI \
-XX:-UseJVMCIClassLoader -d64 -noverify \
-cp ${CLASSPATH} \
-Duser.country=US -Duser.language=en -Dgraal.ForceDebugEnable=false \
-Dgraal.EagerSnippets=true -Dsubstratevm.version=0.24 \
-Dgraalvm.locatorDisabled=true -Dcom.oracle.truffle.aot=true \
-Dtruffle.TruffleRuntime=com.oracle.svm.truffle.api.SubstrateTruffleRuntime \
-Xms1G -Xss10m -Xmx3G \
com.oracle.svm.hosted.BootImageGeneratorRunner \
-imagecp ${CLASSPATH}:${LIB}/svm/library-support.jar:${GRAAL}vm/graalvm.jar:${SOM_DIR}/build/classes/:${SOM_DIR}/libs/somns-deps.jar \
-H:InspectServerContentPath=${LIB}/svm/inspect \
-H:CLibraryPath=${LIB}/svm/clibraries/darwin-amd64 \
-H:Path=. -H:+MultiThreaded -R:YoungGenerationSize=1g -R:OldGenerationSize=3g \
-H:Class=som.vm.Universe -H:Name=somns -H:Features=com.oracle.svm.truffle.TruffleFeature\
-H:-ThrowUnsafeOffsetErrors
# \
# -H:+PrintRuntimeCompileMethods
# -H:+PrintMethodHistogram
# -H:VerifyNamingConventions=true \
# -H:+AddAllCharsets -H:Class=org.truffleruby.Main -H:Name=ruby -H:Features=com.oracle.svm.truffle.TruffleFeature,com.oracle.svm.truffle.TruffleFeature,com.oracle.svm.jnr.SubstrateJNRFeature -H:SubstitutionResources=org/truffleruby/aot/substitutions.json
## JS settings -Dtruffle.js.SubstrateVM=true -Dtruffle.js.PrepareFirstContext=true -Dtruffle.js.Debug=false
# -Dsom.traceFile=${SOM_DIR}/traces/trace -DfailOnMissingOptimization=true
# -esa -ea -Dgraal.TraceTruffleInlining=false -Dgraal.TraceTruffleCompilation=false -Dsom.tools=${SOM_DIR}/tools -Xbootclasspath/a:: som.VM --platform ${SOM_DIR}/core-lib/Platform.som --kernel ${SOM_DIR}/core-lib/Kernel.som core-lib/Hello.som
# Hello World!