From 84fc501cf88ba27945dd707fd4a3e9b49c54c3ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Thu, 11 Mar 2021 09:51:12 +0200 Subject: [PATCH] build-compiler-rt: Tolerate cases where the output libs already have normalized arch names This is needed since 8bd2722f65cfd7883ed9769f7bad3ff50e4c6905 (and 8e11bede3a6ac11ebcc05c82fac39899feaf9534) in llvm-project (past the 12.x release branch), which will allow us to get rid of the whole arch renaming part (once we can assume we're building a version newer than that). --- build-compiler-rt.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build-compiler-rt.sh b/build-compiler-rt.sh index 41a8ecf..450ba1f 100755 --- a/build-compiler-rt.sh +++ b/build-compiler-rt.sh @@ -124,10 +124,10 @@ for arch in $ARCHS; do $BUILDCMD ${CORES+-j$CORES} mkdir -p "$PREFIX/lib/clang/$CLANG_VERSION/lib/windows" mkdir -p "$PREFIX/$arch-w64-mingw32/bin" - for i in lib/windows/libclang_rt.*-$buildarchname*.a; do + for i in lib/windows/libclang_rt.*.a; do cp $i "$PREFIX/lib/clang/$CLANG_VERSION/lib/windows/$(basename $i | sed s/$buildarchname/$libarchname/)" done - for i in lib/windows/libclang_rt.*-$buildarchname*.dll; do + for i in lib/windows/libclang_rt.*.dll; do if [ -f $i ]; then cp $i "$PREFIX/$arch-w64-mingw32/bin" fi