Skip to content

Commit 7ac56dd

Browse files
committed
Update to LLVM 18 to match zig
1 parent 854dcb3 commit 7ac56dd

File tree

12 files changed

+30
-30
lines changed

12 files changed

+30
-30
lines changed

Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,12 @@ RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selectio
3333
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt `
3434
apt-get update && apt-get upgrade && apt-get install -y ca-certificates
3535

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

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

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

4444
# Install build dependencies
@@ -52,9 +52,9 @@ RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/
5252
libtool `
5353
python3 `
5454
gettext `
55-
llvm-17 `
55+
llvm-18 `
5656
autoconf `
57-
clang-17 `
57+
clang-18 `
5858
pkg-config `
5959
ninja-build `
6060
libarchive-tools `
@@ -216,7 +216,7 @@ RUN --mount=type=cache,target=/root/.cache `
216216
FROM layer-00 AS layer-10
217217

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

221221
#--
222222

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,13 @@ This build system is losely base on:
6060

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

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

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

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

69-
- https://github.com/llvm/llvm-project/tree/llvmorg-17.0.6
69+
- https://github.com/llvm/llvm-project/tree/llvmorg-18.1.7
7070
- https://github.com/tpoechtrager/osxcross
7171
- https://github.com/tpoechtrager/cctools-port
7272

scripts/cc.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ case "$(basename "$0")" in
4343
case "$TARGET" in
4444
*darwin*)
4545
# Use clang instead of zig for darwin targets
46-
CMD='clang-17'
46+
CMD='clang-18'
4747
;;
4848
*) CMD='zig cc' ;;
4949
esac
@@ -53,7 +53,7 @@ case "$(basename "$0")" in
5353
case "$TARGET" in
5454
*darwin*)
5555
# Use clang instead of zig for darwin targets
56-
CMD='clang++-17'
56+
CMD='clang++-18'
5757
;;
5858
*) CMD='zig c++' ;;
5959
esac

scripts/rc.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ case "$_name" in
3131
;;
3232
esac
3333

34-
exec "/usr/bin/llvm-${_name}-17" "$@"
34+
exec "/usr/bin/llvm-${_name}-18" "$@"

scripts/tool-wrapper.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ fallback_llvm() {
66
if ! command -v "${_prefix}$(basename "$0")" 1>/dev/null 2>&1; then
77
_prefix='llvm-'
88
if [ "$0" = 'libtool' ]; then
9-
_suffix='-darwin-17'
9+
_suffix='-darwin-18'
1010
else
11-
_suffix='-17'
11+
_suffix='-18'
1212
fi
1313
fi
1414
}
@@ -26,7 +26,7 @@ case "${TARGET:?TARGET envvar is required to be defined}" in
2626
;;
2727
*)
2828
_prefix='llvm-'
29-
_suffix='-17'
29+
_suffix='-18'
3030
;;
3131
esac
3232
;;

stages/00-apple/01-xar.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ esac
1111

1212
apt-get install libssl-dev libz-dev
1313

14-
export CC="clang-17"
15-
export CXX="clang++-17"
14+
export CC="clang-18"
15+
export CXX="clang++-18"
1616
export CFLAGS="-I${CCTOOLS}/include"
1717
export LDFLAGS="-L${CCTOOLS}/lib"
1818
export APPLE_TARGET='__BYPASS__'

stages/00-apple/02-tapi.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ case "$TARGET" in
99
;;
1010
esac
1111

12-
export CC="clang-17"
13-
export CXX="clang++-17"
12+
export CC="clang-18"
13+
export CXX="clang++-18"
1414
export CFLAGS="-I${CCTOOLS}/include"
1515
export LDFLAGS="-L${CCTOOLS}/lib"
1616
export APPLE_TARGET='__BYPASS__'

stages/00-apple/03-dispatch.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ esac
1111

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

14-
export CC="clang-17"
15-
export CXX="clang++-17"
14+
export CC="clang-18"
15+
export CXX="clang++-18"
1616
export CFLAGS="-I${CCTOOLS}/include"
1717
export LDFLAGS="-L${CCTOOLS}/lib"
1818
export APPLE_TARGET='__BYPASS__'

stages/00-apple/04-cctools.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ echo "APPLE_TARGET=$_target" >>/etc/environment
2222

2323
apt-get install uuid-dev libedit-dev
2424

25-
export CC="clang-17"
26-
export CXX="clang++-17"
25+
export CC="clang-18"
26+
export CXX="clang++-18"
2727
export CFLAGS="-I${CCTOOLS}/include"
2828
export LDFLAGS="-L${CCTOOLS}/lib"
2929
export APPLE_TARGET='__BYPASS__'
@@ -47,7 +47,7 @@ cd cctools/cctools
4747
--with-libxar="$CCTOOLS" \
4848
--with-libtapi="$CCTOOLS" \
4949
--with-libdispatch="$CCTOOLS" \
50-
--with-llvm-config=llvm-config-17 \
50+
--with-llvm-config=llvm-config-18 \
5151
--with-libblocksruntime="$CCTOOLS" \
5252
--enable-xar-support \
5353
--enable-lto-support \
@@ -60,4 +60,4 @@ make install
6060
rm -r /srv/cctools
6161

6262
# Create symlinks for llvm-otool because cctools use it when calling its own otool
63-
ln -fs "$(command -v llvm-otool-17)" /opt/cctools/bin/llvm-otool
63+
ln -fs "$(command -v llvm-otool-18)" /opt/cctools/bin/llvm-otool

stages/10-compiler-rt.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ case "$TARGET" in
99
esac
1010

1111
# LLVM install path
12-
LLVM_PATH="/usr/lib/llvm-17"
12+
LLVM_PATH="/usr/lib/llvm-18"
1313

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

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

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

2727
# Link cmake files to where compiler_rt expect to find them

0 commit comments

Comments
 (0)