From 32668f336b93913d4d913b933e0e9c131a32dd56 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 23 Nov 2018 14:54:50 +0200 Subject: [PATCH] Keep clang.exe around if we won't be replacing it with an unprefixed wrapper --- install-wrappers.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/install-wrappers.sh b/install-wrappers.sh index 920dc3c..b6a5933 100755 --- a/install-wrappers.sh +++ b/install-wrappers.sh @@ -70,12 +70,13 @@ if [ -n "$EXEEXT" ]; then if [ ! -L clang$EXEEXT ]; then mv clang$EXEEXT clang-$CLANG_MAJOR$EXEEXT fi - if [ -n "$HOST" ]; then - for exec in clang clang++ gcc g++ cc c99 c11 c++ ar ranlib nm strings widl windres; do - ln -sf $HOST-$exec$EXEEXT $exec$EXEEXT - done - for exec in ld objdump dlltool objcopy strip; do - ln -sf $HOST-$exec $exec - done + if [ -z "$HOST" ]; then + HOST=$(./clang-$CLANG_MAJOR -dumpmachine | sed 's/-.*//')-w64-mingw32 fi + for exec in clang clang++ gcc g++ cc c99 c11 c++ ar ranlib nm strings widl windres; do + ln -sf $HOST-$exec$EXEEXT $exec$EXEEXT + done + for exec in ld objdump dlltool objcopy strip; do + ln -sf $HOST-$exec $exec + done fi