-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
123 lines (106 loc) · 3.37 KB
/
Dockerfile
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
FROM ubuntu:22.04
LABEL version="1.0"
LABEL description="Integrator"
# apt prompts
RUN apt-get update
RUN apt-get upgrade -y
# install deps
RUN apt-get install -y fish \
binutils \
grep \
sed \
build-essential \
make \
cmake \
clang \
llvm \
pkg-config \
python3 \
python3-pip \
python-is-python3 \
git \
zip \
gzip \
unzip \
wget \
dbus \
ninja-build \
meson \
m4 \
gperf \
gcc \
g++ \
nano \
strace \
cproto \
autoconf \
automake \
curl \
gawk \
bison \
flex \
texinfo \
gperf \
libtool \
patchutils \
bc \
libssl-dev \
libmount-dev \
libfdt-dev \
libseccomp-dev \
autotools-dev \
libexpat1-dev \
libpixman-1-dev \
libmpc-dev \
libmpfr-dev \
libgmp-dev \
libcap-dev \
zlib1g-dev \
libexpat-dev \
libglib2.0-dev
RUN pip3 install pyelftools
#####################################
#### Copy folders of the context ####
#####################################
WORKDIR /
COPY static_analyze_embench_iot.sh /
COPY embench-iot /embench-iot
COPY seal /seal
##################################
#### Download riscv Toolchain ####
##################################
WORKDIR /opt
RUN wget https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2023.11.22/riscv32-glibc-ubuntu-22.04-llvm-nightly-2023.11.22-nightly.tar.gz
RUN tar xf riscv32-glibc-ubuntu-22.04-llvm-nightly-2023.11.22-nightly.tar.gz
RUN rm riscv32-glibc-ubuntu-22.04-llvm-nightly-2023.11.22-nightly.tar.gz
###########################################
#### Build Clang, Passes and set paths ####
###########################################
WORKDIR /
RUN wget https://github.com/memgraph/mgclient/archive/refs/tags/v1.4.2.zip
RUN unzip v1.4.2.zip
RUN rm v1.4.2.zip
WORKDIR /mgclient-1.4.2
RUN mkdir -p build
WORKDIR /mgclient-1.4.2/build
RUN cmake ..
RUN make
RUN make install
WORKDIR /seal/llvm-pass-plugin
RUN mkdir -p build
WORKDIR /seal/llvm-pass-plugin/build
RUN cmake ..
RUN make
WORKDIR /
# RUN ./static_analyze_embench_iot.sh --clean
# WORKDIR /llvm-project
# Set Path to compilde clang, clang++, ...
# ARG BUILD_PATH="/llvm-project/build"
# ARG BUILD_BIN="$BUILD_PATH/bin"
# ARG BUILD_LIB="$BUILD_PATH/lib"
# ARG CLANGPP="$BUILD_BIN/clang++"
# ARG CLANG="$BUILD_BIN/clang"
# ARG LOAD_FLAGS="-Xclang -load -Xclang"
WORKDIR /
# RUN export ASAN_SYMBOLIZER=$BUILD_BIN/llvm-symbolizer
# RUN export ASAN_OPTIONS=detect_leaks=0