-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.llvm-win-cross
59 lines (42 loc) · 1.48 KB
/
Dockerfile.llvm-win-cross
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
46
47
48
49
50
51
52
53
54
55
From ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt install -y \
clang-tools clang lld lldb llvm-dev libclang-dev \
wget curl ca-certificates zip unzip vim wine \
cmake msitools p7zip-full ninja-build
ENV DEBIAN_FRONTEND=dialog
ENV WORKDIR=root/project
RUN mkdir $WORKDIR
#Set the working dir to the env variable
WORKDIR $WORKDIR
COPY scripts scripts
SHELL ["/bin/bash", "-c"]
RUN mkdir packages \
&& cd packages \
&& ./../scripts/download_win_sysroot.sh
RUN cd packages \
&& ./../scripts/vfs_overlay.sh
RUN cd packages \
&& python3 ../scripts/rename.py win_sysroot
COPY test test
COPY fuzz fuzz
COPY CMakeLists.txt CMakeLists.txt
COPY cli-test-cases cli-test-cases
COPY src src
COPY cmake_config cmake_config
RUN cmake -GNinja -S . -B winBuild \
-DCMAKE_BUILD_TYPE=Release \
-DBuildTest=TRUE \
-DCMAKE_TOOLCHAIN_FILE=cmake_config/llvm-win-cross.cmake
RUN ninja -C./winBuild
# To get wine to run 32 and 64 bit binaries you have to do the install in stages
#RUN dpkg --add-architecture i386
#RUN apt-get update \
# && apt install -y \
# wine32
ENV WINEPATH="/root/project/packages/win_sysroot/MSVC/14.11.25547/lib/x64"
ENV WINEPATH="$WINEPATH;/root/project/packages/win_sysroot/WINSDK/10.0.22621.0/lib/um/x64"
ENV WINEPATH="$WINEPATH;/root/project/packages/win_sysroot/WINSDK/10.0.22621.0/lib/ucrt/x64"
RUN wine cmd /C winBuild/src/cli/Warf.exe -e "5*(2+3-1)" --show_tree
RUN wine cmd /C winBuild/test/WarfLang_TEST.exe