install-wrappers: Pass --config-system-dir in the --host-clang mode

This is required since e2e92168532ab394782b342bfe81cb900a42f89b
for this configuration to be able to find the config files.

Also add the *.cfg files to the Dockerfile COPY line.
This commit is contained in:
Martin Storsjö 2025-01-07 23:07:23 +02:00
parent 83b64f3049
commit 1f99e3e26e
2 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,7 @@ ARG DEFAULT_CRT=ucrt
ARG CFGUARD_ARGS=--enable-cfguard
COPY build-all.sh build-llvm.sh install-wrappers.sh build-mingw-w64.sh build-mingw-w64-tools.sh build-compiler-rt.sh build-libcxx.sh build-mingw-w64-libraries.sh build-openmp.sh ./
COPY wrappers/*.sh wrappers/*.c wrappers/*.h ./wrappers/
COPY wrappers/*.sh wrappers/*.c wrappers/*.h wrappers/*.cfg ./wrappers/
# Libcxx version 17 requires Clang >= 15, while Libcxx 18 requires Clang >= 16.
RUN LLVM_VERSION=llvmorg-17.0.6 ./build-all.sh $TOOLCHAIN_PREFIX --host-clang=clang-15 && \
rm -rf /build/*

View File

@ -84,7 +84,7 @@ if [ -n "${HOST_CLANG}" ]; then
# Note: clang will detect the "InstalledDir" based on the path that was used to invoke the tools
# This might still have some hidden effects
printf '#!/bin/sh\nsr=$(dirname "$(dirname "$(readlink -f "$0")")")\nexec %s -resource-dir="$sr"%s --sysroot="$sr" "$@"\n' "$HOST_CLANG_EXE" "$clangres" > $PREFIX/bin/clang
printf '#!/bin/sh\nsr=$(dirname "$(dirname "$(readlink -f "$0")")")\nexec %s -resource-dir="$sr"%s --sysroot="$sr" --config-system-dir="$sr"/bin "$@"\n' "$HOST_CLANG_EXE" "$clangres" > $PREFIX/bin/clang
# printf '#!/bin/sh\nsr=$(dirname "$(dirname "$(readlink -f "$0")")")\nexec %s -resource-dir="$sr"%s --sysroot="$sr" "$@"\n' "$(readlink -f "$HOST_CLANG_EXE")" "$clangres" > $PREFIX/bin/clang
chmod 755 $PREFIX/bin/clang
ln -sf clang $PREFIX/bin/clang++