forked from sfu-rsl/symrustc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
z3.Dockerfile
46 lines (30 loc) · 982 Bytes
/
z3.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
FROM ubuntu:22.10 AS base
SHELL ["/bin/bash", "-c"]
ARG LLVM_VERSION=15
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends --reinstall ca-certificates \
clang-$LLVM_VERSION \
make \
cmake \
git \
python3 \
&& apt-get clean
ENV PATH=/usr/lib/llvm-$LLVM_VERSION/bin:$PATH
ENV LD_LIBRARY_PATH=/usr/lib/llvm-$LLVM_VERSION/lib:$LD_LIBRARY_PATH
ENV CC=clang
ENV CXX=clang++
WORKDIR /home
FROM base as builder
RUN git clone --depth 1 -b z3-4.11.2 https://github.com/Z3Prover/z3.git
ARG INSTALL_PREFIX=/home/dist
# https://github.com/season-lab/SymFusion/blob/main/docker/Dockerfile
RUN mkdir build \
&& cd build \
&& cmake ../z3 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
&& make -j `nproc` \
&& make install
FROM ubuntu:22.10 AS dist
ARG INSTALL_PREFIX=/home/dist
COPY --from=builder $INSTALL_PREFIX $INSTALL_PREFIX