Skip to content

Commit

Permalink
Add docker-compose for symqemu
Browse files Browse the repository at this point in the history
  • Loading branch information
rmalmain committed May 14, 2024
1 parent 33cd24f commit f335f79
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 13 deletions.
42 changes: 29 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# prepare machine
FROM ubuntu:22.04 as builder
FROM ubuntu:22.04 as base

RUN apt update && apt install -y \
ninja-build \
Expand All @@ -16,7 +16,10 @@ RUN apt update && apt install -y \
z3 \
libz3-dev \
libz3-dev \
libzstd-dev
libzstd-dev \
colordiff \
xxd \
wdiff

RUN pip install --user meson

Expand All @@ -35,20 +38,33 @@ RUN if [ $LLVM_VERSION -eq 12 ] || [ $LLVM_VERSION -eq 13 ] || [ $LLVM_VERSION
else mkdir /llvm && cd /llvm && wget https://apt.llvm.org/llvm.sh && chmod +x llvm.sh && ./llvm.sh ${LLVM_VERSION}; \
fi

RUN <<EOF cat > /configure_symqemu.sh
../configure \
--audio-drv-list= \
--disable-sdl \
--disable-gtk \
--disable-vte \
--disable-opengl \
--disable-virglrenderer \
--target-list=x86_64-linux-user,riscv64-linux-user \
--enable-debug \
--enable-debug-tcg \
--symcc-rt-llvm-version="$LLVM_VERSION" \
--disable-werror
EOF

RUN chmod u+x /configure_symqemu.sh

FROM base as symqemu-dev

WORKDIR /symqemu_source

FROM base as symqemu

COPY . /symqemu_source
WORKDIR /symqemu_source

RUN mkdir build && cd build && ../configure \
--audio-drv-list= \
--disable-sdl \
--disable-gtk \
--disable-vte \
--disable-opengl \
--disable-virglrenderer \
--target-list=x86_64-linux-user,riscv64-linux-user \
--enable-debug \
--enable-debug-tcg \
--symcc-rt-llvm-version="$LLVM_VERSION"
RUN mkdir build && cd build && /configure_symqemu.sh

RUN cd build && make -j

Expand Down
17 changes: 17 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
services:
symqemu-dev:
build:
context: .
dockerfile: Dockerfile
target: symqemu-dev
volumes:
- ./:/symqemu_source
- /symqemu_source/build
command: tail -f /dev/null

symqemu:
build:
context: .
dockerfile: Dockerfile
target: symqemu
command: tail -f /dev/null

0 comments on commit f335f79

Please sign in to comment.