-
-
Notifications
You must be signed in to change notification settings - Fork 50
/
Dockerfile
33 lines (26 loc) · 872 Bytes
/
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
FROM ubuntu:22.04
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
apt-get update && apt-get install -y \
lsb-release \
wget \
software-properties-common \
gnupg \
cmake \
git
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
wget https://apt.llvm.org/llvm.sh \
&& chmod +x llvm.sh \
&& ./llvm.sh 18 \
&& rm llvm.sh
COPY . /root/Mergen
RUN ln -s /usr/bin/clang-18 /usr/bin/clang \
&& ln -s /usr/bin/clang-cpp-18 /usr/bin/clang-cpp \
&& ln -s /usr/bin/clang-cpp-18 /usr/bin/clang++
ENV CC=/usr/bin/clang
ENV CXX=/usr/bin/clang++
RUN mkdir -p /root/Mergen/build
WORKDIR /root/Mergen/build
RUN cmake .. && cmake --build . -j $(nproc)
# Provide the built binary path as the default output for the container
WORKDIR /root/Mergen/build
CMD ["cp", "/root/Mergen/build/lifter", "/output/lifter"]