forked from oracle/trufflex86
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mkstatic
executable file
·31 lines (27 loc) · 1.01 KB
/
mkstatic
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
#!/bin/sh
#
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
#
ROOT=$HOME/git
GRAAL=$ROOT/graal
TRUFFLE=$ROOT/graal/truffle
SVM=$GRAAL/substratevm
VMX86=$ROOT/vmx86
CORE=$ROOT/core
EXECUTABLE="$1"
OUTPUT="$2"
if [ $# -ne 2 ]; then
echo "Usage: $0 /path/to/program/file /path/to/output/file"
exit 1
fi
(cd $SVM && mx native-image \
--tool:truffle \
-H:MaxRuntimeCompileMethods=10000 \
-H:Name=$OUTPUT \
-H:CLibraryPath=$VMX86/mxbuild/linux-amd64/VMX86_GRAALVM_SUPPORT/clibraries/linux-amd64 \
-Dgraal.TruffleCompilationExceptionsArePrinted=true \
-Dgraal.ExitVMOnException=true \
-Dvmx86.elf.binary=$EXECUTABLE \
-cp $CORE/build/core.jar:$CORE/build/posix.jar:$GRAAL/sdk/mxbuild/dists/jdk11/graal-sdk.jar:$TRUFFLE/mxbuild/dists/jdk11/truffle-api.jar:$TRUFFLE/mxbuild/dists/jdk11/truffle-nfi.jar:$VMX86/build/vmx86.jar:$VMX86/build/memory-svm.jar \
org.graalvm.vm.x86.AMD64BundledVM)