From f80d067176c75cc459c22caddc41c8a26d4f5564 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Fri, 21 Jun 2019 22:46:15 +0300 Subject: [PATCH] Only make the prefixless widl symlink after compiling widl When building in msys2, symlinks are plain copies, and one can't make the symlink in advance. --- build-mingw-w64.sh | 8 +++++++- install-wrappers.sh | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/build-mingw-w64.sh b/build-mingw-w64.sh index fe8b20e..c59cf31 100755 --- a/build-mingw-w64.sh +++ b/build-mingw-w64.sh @@ -137,11 +137,17 @@ for arch in $ARCHS; do make install cd .. done +cd $PREFIX/bin if [ -n "$SKIP_INCLUDE_TRIPLET_PREFIX" ]; then - cd $PREFIX/bin for arch in $ALL_ARCHS; do if [ "$arch" != "$ARCHS" ]; then ln -sf $ARCHS-w64-mingw32-widl$EXEEXT $arch-w64-mingw32-widl$EXEEXT fi done fi +if [ -n "$EXEEXT" ]; then + if [ -z "$HOST" ]; then + HOST=$(./clang -dumpmachine | sed 's/-.*//')-w64-mingw32 + fi + ln -sf $HOST-widl$EXEEXT widl$EXEEXT +fi diff --git a/install-wrappers.sh b/install-wrappers.sh index e281182..57dc7de 100755 --- a/install-wrappers.sh +++ b/install-wrappers.sh @@ -78,7 +78,7 @@ if [ -n "$EXEEXT" ]; then 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 objcopy strings strip widl windres; do + for exec in clang clang++ gcc g++ cc c99 c11 c++ ar ranlib nm objcopy strings strip windres; do ln -sf $HOST-$exec$EXEEXT $exec$EXEEXT done for exec in ld objdump dlltool; do