-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild-graal-helpers.bash
More file actions
executable file
·58 lines (49 loc) · 1.18 KB
/
build-graal-helpers.bash
File metadata and controls
executable file
·58 lines (49 loc) · 1.18 KB
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
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -eux
check_baseloc () {
if [ -n "$BASELOC" ]; then
echo "BASELOC is given as $BASELOC"
else
echo "BASELOC is not set!"
exit 1
fi
}
check_arch () {
if [ -n "$ARCH" ]; then
echo "ARCH is given as $ARCH"
else
echo "ARCH is not set!"
exit 1
fi
}
check_jdk_labs () {
if [ -n "$MX_JDK_LABS" ]; then
echo "MX_JDK_LABS is given as $MX_JDK_LABS"
else
echo "MX_JDK_LABS is not set!"
exit 1
fi
}
check_vars () {
check_baseloc
check_arch
check_jdk_labs
}
main () {
check_vars
#
cd "$BASELOC/testing/graal"
export PATH="$BASELOC/testing/mx:$PATH"
export JAVA_HOME="$MX_JDK_LABS"
COSMOCC="$BASELOC/testing/cosmopolitan/cosmocc"
export PATH="$COSMOCC/bin:$PATH"
cd substratevm
mx clean
MULTITARGET=linux-$ARCH-cosmo mx build \
--projects com.oracle.svm.native.jvm.posix,com.oracle.svm.native.libchelper,com.oracle.svm.native.libcontainer
RESULT_DIR="$BASELOC/build/graal-$ARCH-helpers"
mkdir -p "$RESULT_DIR"
cp $(find mxbuild -name '*.a' | grep cosmo | xargs ls -t | head -n 3) "$RESULT_DIR"
cd "$BASELOC"
}
main