-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathverify-c-common-fuzz.Dockerfile
45 lines (34 loc) · 1.58 KB
/
verify-c-common-fuzz.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
## TODO: seahorn now uses llvm14, move smack to also use llvm14
FROM seahorn/seahorn-llvm14:nightly
ENV SEAHORN=/home/usea/seahorn/bin/sea PATH="$PATH:/home/usea/seahorn/bin:/home/usea/bin"
## install required pacakges
USER root
## Install latest cmake
RUN apt -y remove --purge cmake
RUN apt -y update
RUN apt -y install wget python3-pip
RUN python3 -m pip install --upgrade pip
RUN pip3 install cmake --upgrade
# Install dependencies (Python and LLVM Cov Tools)
RUN apt -y install python3
RUN apt -y install clang-14 llvm-14 llvm-14-dev llvm-14-tools lcov
## clone verify-c-common repository
USER usea
WORKDIR /home/usea
#RUN git clone https://github.com/yvizel/verify-c-common.git
# assume we are run inside verify-c-common
RUN mkdir verify-c-common
COPY . verify-c-common
## clone aws-c-common repository
WORKDIR /home/usea/verify-c-common
RUN rm -rf aws-c-common && git clone https://github.com/awslabs/aws-c-common.git
WORKDIR /home/usea/verify-c-common/aws-c-common
RUN mkdir build && cd build && cmake -DCMAKE_C_COMPILER=clang-10 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=1 \
-DCMAKE_INSTALL_PREFIX=$(pwd)/run \
-DCMAKE_C_FLAGS='-fsanitize=fuzzer-no-link,address,undefined -fprofile-instr-generate -fcoverage-mapping' \
../ -GNinja && \
cmake --build . --target install
WORKDIR /home/usea/verify-c-common
RUN mkdir build && cd build && cmake -DSEA_LINK=llvm-link-14 -DCMAKE_C_COMPILER=clang-14 -DCMAKE_CXX_COMPILER=clang++-14 -DSEAHORN_ROOT=/home/usea/seahorn -DSEA_ENABLE_FUZZ=ON -Daws-c-common_DIR=$(pwd)/../aws-c-common/build/run/lib/aws-c-common/cmake/ ../ -GNinja && cmake --build .
USER root