-
Notifications
You must be signed in to change notification settings - Fork 42
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
Showing
1 changed file
with
20 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,44 @@ | ||
# prepare machine | ||
FROM ubuntu:22.04 as builder | ||
|
||
RUN apt update | ||
RUN apt install -y \ | ||
RUN apt update && apt install -y \ | ||
ninja-build \ | ||
libglib2.0-dev \ | ||
llvm \ | ||
git \ | ||
python3 \ | ||
python3-pip | ||
|
||
# | ||
FROM builder as symqemu | ||
python3-pip \ | ||
cmake \ | ||
wget \ | ||
lsb-release \ | ||
software-properties-common \ | ||
gnupg \ | ||
z3 \ | ||
libz3-dev \ | ||
libz3-dev \ | ||
libzstd-dev \ | ||
llvm-15 \ | ||
clang-15 | ||
|
||
RUN pip install --user meson | ||
|
||
COPY . /symqemu_source | ||
WORKDIR /symqemu_source | ||
|
||
# Meson gives an error if symcc is in a subdirectory of symqemu | ||
RUN mv /symqemu_source/symcc /symcc | ||
|
||
# The only symcc artifact needed by symqemu is libSymRuntime.so | ||
# Instead of compiling symcc in this image, we rely on the existing symcc docker image and | ||
# we just copy libSymRuntime.so at the location where symqemu expects it | ||
COPY --from=symcc /symcc_build/SymRuntime-prefix/src/SymRuntime-build/libSymRuntime.so /symcc/build/SymRuntime-prefix/src/SymRuntime-build/libSymRuntime.so | ||
|
||
RUN ./configure \ | ||
RUN mkdir build && cd build && ../configure \ | ||
--audio-drv-list= \ | ||
--disable-sdl \ | ||
--disable-gtk \ | ||
--disable-vte \ | ||
--disable-opengl \ | ||
--disable-virglrenderer \ | ||
--disable-werror \ | ||
--target-list=x86_64-linux-user,riscv64-linux-user \ | ||
--target-list=x86_64-linux-user,riscv64-linux-user \ | ||
--enable-debug \ | ||
--symcc-source=/symcc \ | ||
--symcc-build=/symcc/build \ | ||
--enable-debug-tcg \ | ||
--enable-werror | ||
--enable-debug-tcg | ||
|
||
RUN make -j | ||
RUN cd build && ninja | ||
|
||
RUN make check | ||
RUN cd build && ninja check | ||
|
||
WORKDIR /symqemu_source/tests/symqemu | ||
RUN python3 -m unittest test.py |