mirror of
https://github.com/godotengine/build-containers.git
synced 2026-01-04 18:10:06 +03:00
This reverts #105 as we found that the MinGW/GCC/binutils combinations in Fedora 35 generates broken Windows binaries. To workaround the issue with LLVM 14 on F36, we build Clang 13.0.1 from source for osxcross in the OSX container. This matches Xcode 13.
39 lines
1.7 KiB
Docker
39 lines
1.7 KiB
Docker
ARG img_version
|
|
FROM godot-mono:${img_version}
|
|
|
|
ARG mono_version
|
|
|
|
RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \
|
|
dnf -y install --setopt=install_weak_deps=False \
|
|
automake autoconf bzip2-devel cmake libicu-devel libtool libxml2-devel openssl-devel yasm && \
|
|
git clone --progress https://github.com/tpoechtrager/osxcross.git && \
|
|
cd /root/osxcross && \
|
|
git checkout 610542781e0eabc6968b0c0719bbc8d25c992025 && \
|
|
ln -s /root/files/MacOSX12.3.sdk.tar.xz /root/osxcross/tarballs && \
|
|
sed -i build.sh -e "/ 12.1\*/a 12.3*) TARGET=darwin21.4; X86_64H_SUPPORTED=1; I386_SUPPORTED=0; ARM_SUPPORTED=1; NEED_TAPI_SUPPORT=1; OSX_VERSION_MIN_INT=10.9; ;;" && \
|
|
sed -i build_compiler_rt.sh -e "s@BRANCH=main@BRANCH=release/14.x@g" && \
|
|
export UNATTENDED=1 && \
|
|
# Custom build to ensure we have Clang version matching Xcode SDK.
|
|
CLANG_VERSION=13.0.1 ENABLE_CLANG_INSTALL=1 INSTALLPREFIX=/usr ./build_clang.sh && \
|
|
./build.sh && \
|
|
./build_compiler_rt.sh && \
|
|
rm -rf /root/osxcross/build
|
|
|
|
ENV OSXCROSS_ROOT=/root/osxcross
|
|
ENV PATH="/root/osxcross/target/bin:${PATH}"
|
|
|
|
RUN cp -a /root/files/${mono_version} /root && \
|
|
cd /root/${mono_version} && \
|
|
patch -p1 < /root/files/patches/mono-btls-cmake-wrapper.patch && \
|
|
export MONO_SOURCE_ROOT=/root/${mono_version} && \
|
|
export OSXCROSS_SDK=21.4 && \
|
|
cd /root/${mono_version}/godot-mono-builds && \
|
|
python3 osx.py configure -j --target=x86_64 --target=arm64 && \
|
|
python3 osx.py make -j --target=x86_64 --target=arm64 && \
|
|
python3 bcl.py make --product=desktop && \
|
|
python3 osx.py copy-bcl --target=x86_64 --target=arm64 && \
|
|
cd /root && \
|
|
rm -rf /root/${mono_version}
|
|
|
|
CMD /bin/bash
|