-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b3b41c9
commit 49dfd5c
Showing
3 changed files
with
36 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM ubuntu:20.04 | ||
ENV DEBIAN_FRONTEND=noninteractive | ||
|
||
RUN apt update -y | ||
|
||
# Apparently wget is not installed by default | ||
RUN apt-get install -y wget | ||
|
||
# Add llvm pub key | ||
RUN wget -qO- https://apt.llvm.org/llvm-snapshot.gpg.key | tee /etc/apt/trusted.gpg.d/apt.llvm.org.asc | ||
|
||
# Install add-apt-repository | ||
RUN apt-get install -y software-properties-common | ||
|
||
# Add llvm 18 repository with sources | ||
RUN add-apt-repository -s -y "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-18 main" | ||
|
||
RUN echo apt-get update && apt-get install -y llvm-18 clang-18 libclang-18-dev libclang-cpp18-dev python3-pip | ||
|
||
# Easiest way to get sufficiently new cmake appears to be using pip - Ubuntu 20.10 version is too old | ||
RUN pip3 install --upgrade cmake | ||
|
||
# Copy the source into the Docker container | ||
RUN mkdir -p /c2ffi | ||
COPY / /c2ffi | ||
WORKDIR /c2ffi | ||
|
||
# Build c2ffi | ||
RUN cd /c2ffi && \ | ||
rm -rf build && mkdir -p build && cd build && \ | ||
cmake -DBUILD_CONFIG=Release .. && make | ||
|
||
# As a sanity check, make sure the binary we built can be executed | ||
RUN /c2ffi/build/bin/c2ffi --help |
This file was deleted.
Oops, something went wrong.