Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG VERSION='0.0.0'
ARG OS_IPHONE='0'

# renovate: datasource=github-releases depName=ziglang/zig
ARG ZIG_VERSION='0.12.1'
ARG ZIG_VERSION='0.13.0'
# renovate: datasource=github-releases depName=mesonbuild/meson
ARG MESON_VERSION='1.5.1'
# renovate: datasource=github-releases depName=Kitware/CMake
Expand All @@ -33,12 +33,12 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt `
apt-get update && apt-get upgrade && apt-get install -y ca-certificates

# Add LLVM 17 repository
# Add LLVM 18 repository
ADD https://apt.llvm.org/llvm-snapshot.gpg.key /etc/apt/trusted.gpg.d/apt.llvm.org.asc

RUN chmod 644 /etc/apt/trusted.gpg.d/apt.llvm.org.asc

RUN echo "deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-17 main" `
RUN echo "deb https://apt.llvm.org/bookworm/ llvm-toolchain-bookworm-18 main" `
> /etc/apt/sources.list.d/llvm.list

# Install build dependencies
Expand All @@ -52,9 +52,9 @@ RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/
libtool `
python3 `
gettext `
llvm-17 `
llvm-18 `
autoconf `
clang-17 `
clang-18 `
pkg-config `
ninja-build `
libarchive-tools `
Expand Down Expand Up @@ -216,7 +216,7 @@ RUN --mount=type=cache,target=/root/.cache `
FROM layer-00 AS layer-10

COPY --from=layer-10-sse2neon "${PREFIX}/." "$PREFIX"
COPY --from=layer-10-compiler-rt "/usr/lib/llvm-17/lib/clang/17/." '/usr/lib/llvm-17/lib/clang/17'
COPY --from=layer-10-compiler-rt "/usr/lib/llvm-18/lib/clang/18/." '/usr/lib/llvm-18/lib/clang/18'

#--

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,13 @@ This build system is losely base on:

- https://github.com/BtbN/FFmpeg-Builds

It uses Zig 0.12 as a C/C++ toolchain to build the Windows and Linux targets:
It uses Zig 0.13 as a C/C++ toolchain to build the Windows and Linux targets:

- https://github.com/ziglang/zig/tree/0.11.0

It uses LLVM/Clang 17 with some tweaks from osxcross + Apple's cctools and linker to build the Darwin (macOS, iOS) targets:
It uses LLVM/Clang 18 with some tweaks from osxcross + Apple's cctools and linker to build the Darwin (macOS, iOS) targets:

- https://github.com/llvm/llvm-project/tree/llvmorg-17.0.6
- https://github.com/llvm/llvm-project/tree/llvmorg-18.1.7
- https://github.com/tpoechtrager/osxcross
- https://github.com/tpoechtrager/cctools-port

Expand Down
4 changes: 2 additions & 2 deletions scripts/cc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ case "$(basename "$0")" in
case "$TARGET" in
*darwin*)
# Use clang instead of zig for darwin targets
CMD='clang-17'
CMD='clang-18'
;;
*) CMD='zig cc' ;;
esac
Expand All @@ -53,7 +53,7 @@ case "$(basename "$0")" in
case "$TARGET" in
*darwin*)
# Use clang instead of zig for darwin targets
CMD='clang++-17'
CMD='clang++-18'
;;
*) CMD='zig c++' ;;
esac
Expand Down
2 changes: 1 addition & 1 deletion scripts/rc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ case "$_name" in
;;
esac

exec "/usr/bin/llvm-${_name}-17" "$@"
exec "/usr/bin/llvm-${_name}-18" "$@"
6 changes: 3 additions & 3 deletions scripts/tool-wrapper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ fallback_llvm() {
if ! command -v "${_prefix}$(basename "$0")" 1>/dev/null 2>&1; then
_prefix='llvm-'
if [ "$0" = 'libtool' ]; then
_suffix='-darwin-17'
_suffix='-darwin-18'
else
_suffix='-17'
_suffix='-18'
fi
fi
}
Expand All @@ -26,7 +26,7 @@ case "${TARGET:?TARGET envvar is required to be defined}" in
;;
*)
_prefix='llvm-'
_suffix='-17'
_suffix='-18'
;;
esac
;;
Expand Down
4 changes: 2 additions & 2 deletions stages/00-apple/01-xar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ esac

apt-get install libssl-dev libz-dev

export CC="clang-17"
export CXX="clang++-17"
export CC="clang-18"
export CXX="clang++-18"
export CFLAGS="-I${CCTOOLS}/include"
export LDFLAGS="-L${CCTOOLS}/lib"
export APPLE_TARGET='__BYPASS__'
Expand Down
4 changes: 2 additions & 2 deletions stages/00-apple/02-tapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ case "$TARGET" in
;;
esac

export CC="clang-17"
export CXX="clang++-17"
export CC="clang-18"
export CXX="clang++-18"
export CFLAGS="-I${CCTOOLS}/include"
export LDFLAGS="-L${CCTOOLS}/lib"
export APPLE_TARGET='__BYPASS__'
Expand Down
4 changes: 2 additions & 2 deletions stages/00-apple/03-dispatch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ esac

apt-get install systemtap-sdt-dev libbsd-dev linux-libc-dev

export CC="clang-17"
export CXX="clang++-17"
export CC="clang-18"
export CXX="clang++-18"
export CFLAGS="-I${CCTOOLS}/include"
export LDFLAGS="-L${CCTOOLS}/lib"
export APPLE_TARGET='__BYPASS__'
Expand Down
8 changes: 4 additions & 4 deletions stages/00-apple/04-cctools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ echo "APPLE_TARGET=$_target" >>/etc/environment

apt-get install uuid-dev libedit-dev

export CC="clang-17"
export CXX="clang++-17"
export CC="clang-18"
export CXX="clang++-18"
export CFLAGS="-I${CCTOOLS}/include"
export LDFLAGS="-L${CCTOOLS}/lib"
export APPLE_TARGET='__BYPASS__'
Expand All @@ -47,7 +47,7 @@ cd cctools/cctools
--with-libxar="$CCTOOLS" \
--with-libtapi="$CCTOOLS" \
--with-libdispatch="$CCTOOLS" \
--with-llvm-config=llvm-config-17 \
--with-llvm-config=llvm-config-18 \
--with-libblocksruntime="$CCTOOLS" \
--enable-xar-support \
--enable-lto-support \
Expand All @@ -60,4 +60,4 @@ make install
rm -r /srv/cctools

# Create symlinks for llvm-otool because cctools use it when calling its own otool
ln -fs "$(command -v llvm-otool-17)" /opt/cctools/bin/llvm-otool
ln -fs "$(command -v llvm-otool-18)" /opt/cctools/bin/llvm-otool
4 changes: 2 additions & 2 deletions stages/00-apple/05-ldid.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ case "$TARGET" in
;;
esac

export CC="clang-17"
export CXX="clang++-17"
export CC="clang-18"
export CXX="clang++-18"
export CFLAGS="-I${CCTOOLS}/include"
export LDFLAGS="-L${CCTOOLS}/lib"
export APPLE_TARGET='__BYPASS__'
Expand Down
6 changes: 3 additions & 3 deletions stages/10-compiler-rt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ case "$TARGET" in
esac

# LLVM install path
LLVM_PATH="/usr/lib/llvm-17"
LLVM_PATH="/usr/lib/llvm-18"

# Remove wrapper from PATH, because we need to call the original cmake
PATH="$(echo "${PATH}" | awk -v RS=: -v ORS=: '/\/wrapper^/ {next} {print}')"
Expand All @@ -19,9 +19,9 @@ echo "Download llvm compiler_rt..."

mkdir -p "${LLVM_PATH}/compiler_rt/build"

curl_tar 'https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/cmake-17.0.6.src.tar.xz' \
curl_tar 'https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.7/cmake-18.1.7.src.tar.xz' \
"${LLVM_PATH}/cmake" 1
curl_tar 'https://github.com/llvm/llvm-project/releases/download/llvmorg-17.0.6/compiler-rt-17.0.6.src.tar.xz' \
curl_tar 'https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.7/compiler-rt-18.1.7.src.tar.xz' \
"${LLVM_PATH}/compiler_rt" 1

# Link cmake files to where compiler_rt expect to find them
Expand Down
2 changes: 1 addition & 1 deletion stages/50-x265.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ ln -s ../10bit/libx265.a libx265_main10.a
mv libx265.a libx265_main.a

# Must use llvm ar due to mri-script
llvm-ar-17 -M <<EOF
llvm-ar-18 -M <<EOF
CREATE libx265.a
ADDLIB libx265_main.a
ADDLIB libx265_main10.a
Expand Down
4 changes: 2 additions & 2 deletions stages/99-ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ if [ "$(uname -m)" = "${TARGET%%-*}" ] && (case "$TARGET" in *linux* | x86_64-wi
# Unfortunatly that means we only suport cuda in the same architecture as the host system
# https://github.com/ziglang/zig/pull/10704#issuecomment-1023616464
env_specific_arg+=(
--nvcc="clang-17 -target ${TARGET}"
--nvcc="clang-18 -target ${TARGET}"
--enable-cuda-llvm
--enable-ffnvcodec
--disable-cuda-nvcc
Expand Down Expand Up @@ -176,7 +176,7 @@ if ! ./configure \
--cxx=c++ \
--strip=strip \
--ranlib=ranlib \
--host-cc=clang-17 \
--host-cc=clang-18 \
--windres="windres" \
--pkg-config=pkg-config \
--pkg-config-flags="--static" \
Expand Down