-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile.buildstatic
37 lines (35 loc) · 1.83 KB
/
Dockerfile.buildstatic
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
FROM zjuchenyuan/gollvm
ADD scripts/build /g/scripts/build
ADD scripts/ir2cfg /g/scripts/ir2cfg
RUN COMMENT="install bazel" && cd / &&\
curl -fsSL https://bazel.build/bazel-release.pub.gpg | gpg --dearmor > bazel.gpg &&\
mv bazel.gpg /etc/apt/trusted.gpg.d/ &&\
echo "deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.8" > /etc/apt/sources.list.d/bazel.list &&\
apt update && apt install -y bazel-3.7.0 &&\
ln -s /usr/bin/bazel-3.7.0 /usr/bin/bazel &&\
COMMENT="install go 1.15.3" && cd / &&\
ln -s /usr/bin/python3 /usr/bin/python &&\
apt install -y zip unzip &&\
wget -q https://golang.org/dl/go1.15.3.linux-amd64.tar.gz &&\
tar xf go1.15.3.linux-amd64.tar.gz &&\
COMMENT="install go-callvis to /g"&& cd / &&\
git clone https://github.com/ofabry/go-callvis &&\
cd go-callvis && git checkout 71bdc75 &&\
git apply /g/scripts/build/gocallvis_edgeprint.patch &&\
/go/bin/go build && mv go-callvis /g/go-callvis &&\
git apply /g/scripts/build/gocallvis_rta.patch &&\
/go/bin/go build && mv go-callvis /g/go-callvis.rta &&\
COMMENT="fetch llvm source code and compile our ir2cfg" && cd / &&\
wget -q https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz &&\
tar xf llvm-project-10.0.1.tar.xz && rm llvm-project-10.0.1.tar.xz &&\
cd /g/scripts/ir2cfg &&\
cmake -DCYY_LLVM_SRC_DIR=/llvm-project-10.0.1 . && make &&\
COMMENT="prepare gvisor" && cd / &&\
git clone https://github.com/google/gvisor /gvisor
ENV COMMIT release-20210125.0
RUN cd /gvisor && git checkout $COMMIT &&\
/g/scripts/build/buildrunsc.sh $COMMIT &&\
PATH=/go/bin:$PATH /g/scripts/build/buildgopath.sh $COMMIT &&\
rm -rf /root/.cache/go-build &&\
/g/scripts/build/buildllvmir.sh $COMMIT &&\
/g/scripts/build/getcfg.sh $COMMIT