From 1f99e3e26e63d107d28ff95dff9f3c656c020058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 7 Jan 2025 23:07:23 +0200 Subject: [PATCH] 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. --- Dockerfile.system-clang | 2 +- install-wrappers.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.system-clang b/Dockerfile.system-clang index 267899e..8da382d 100644 --- a/Dockerfile.system-clang +++ b/Dockerfile.system-clang @@ -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/* diff --git a/install-wrappers.sh b/install-wrappers.sh index b0f4a8e..ce5c2af 100755 --- a/install-wrappers.sh +++ b/install-wrappers.sh @@ -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++