From 5e0fd8fe8207b4efc12827a462afb2bda8bdb331 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 27 Oct 2022 10:27:08 +0300 Subject: [PATCH] prepare-cross-toolchain: Copy all runtime DLLs to the main bin directory We used to copy libc++ and libunwind, since those were needed to actually run the toolchain - but others, like the asan runtime, may be needed for the user to be able to run the executables that are built. If this bin directory is in the user's $PATH, they should be picked up automatically. For distribution, and for architectures other than the default, the user still needs to use the binaries from the arch specific directories. --- prepare-cross-toolchain.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/prepare-cross-toolchain.sh b/prepare-cross-toolchain.sh index 4bafc4d..4999389 100755 --- a/prepare-cross-toolchain.sh +++ b/prepare-cross-toolchain.sh @@ -30,12 +30,11 @@ CLANG_RESOURCE_DIR="$("$SRC/bin/clang" --print-resource-dir)" CLANG_VERSION=$(basename "$CLANG_RESOURCE_DIR") # If linked to a shared libc++/libunwind, we need to bundle those DLLs -# in the bin directory. -for i in libc++ libunwind; do - if [ -f $SRC/$CROSS_ARCH-w64-mingw32/bin/$i.dll ]; then - cp $SRC/$CROSS_ARCH-w64-mingw32/bin/$i.dll $DEST/bin - fi -done +# in the bin directory. For simplicity, copy all runtime DLLs to the +# bin directory - that way, users who have this directory in $PATH +# can run the executables they've built directly without fiddling +# with copying them. +cp $SRC/$CROSS_ARCH-w64-mingw32/bin/*.dll $DEST/bin # Copy the clang resource files (include, lib, share). The clang cross # build installs the main headers, but since we didn't build the runtimes