diff --git a/llvm/test/tools/llvm-ar/tool-name.test b/llvm/test/tools/llvm-ar/tool-name.test --- a/llvm/test/tools/llvm-ar/tool-name.test +++ b/llvm/test/tools/llvm-ar/tool-name.test @@ -3,9 +3,10 @@ # RUN: rm -rf %t # RUN: mkdir %t -# RUN: ln -s llvm-ar %t/llvm-ar-9 -# RUN: ln -s llvm-ar %t/ar.exe -# RUN: ln -s llvm-ar %t/arm-pokymllib32-linux-gnueabi-llvm-ar-9 +# RUN: EXE=$(command -v llvm-ar) +# RUN: ln -s $EXE %t/llvm-ar-9 +# RUN: ln -s $EXE %t/ar.exe +# RUN: ln -s $EXE %t/arm-pokymllib32-linux-gnueabi-llvm-ar-9 # RUN: llvm-ar h | FileCheck %s # RUN: %t/llvm-ar-9 h | FileCheck %s diff --git a/llvm/test/tools/llvm-dlltool/tool-name.test b/llvm/test/tools/llvm-dlltool/tool-name.test --- a/llvm/test/tools/llvm-dlltool/tool-name.test +++ b/llvm/test/tools/llvm-dlltool/tool-name.test @@ -3,8 +3,9 @@ # RUN: rm -rf %t # RUN: mkdir %t -# RUN: ln -s llvm-dlltool %t/dlltool.exe -# RUN: ln -s llvm-dlltool %t/dlltool-10 +# RUN: EXE=$(command -v llvm-dlltool) +# RUN: ln -s $EXE %t/dlltool.exe +# RUN: ln -s $EXE %t/dlltool-10 # RUN: not llvm-dlltool 2>&1 | FileCheck %s # RUN: not %t/dlltool.exe 2>&1 | FileCheck %s diff --git a/llvm/test/tools/llvm-lib/tool-name.test b/llvm/test/tools/llvm-lib/tool-name.test --- a/llvm/test/tools/llvm-lib/tool-name.test +++ b/llvm/test/tools/llvm-lib/tool-name.test @@ -4,8 +4,9 @@ # RUN: rm -rf %t # RUN: mkdir %t ## See D44808, MSBuild runs Lib.exe -# RUN: ln -s llvm-lib %t/Lib.exe -# RUN: ln -s llvm-lib %t/llvm-lib-10 +# RUN: EXE=$(command -v llvm-lib) +# RUN: ln -s $EXE %t/Lib.exe +# RUN: ln -s $EXE %t/llvm-lib-10 # RUN: llvm-lib '/?' | FileCheck %s # RUN: %t/Lib.exe '/?' | FileCheck %s diff --git a/llvm/test/tools/llvm-objcopy/tool-name.test b/llvm/test/tools/llvm-objcopy/tool-name.test --- a/llvm/test/tools/llvm-objcopy/tool-name.test +++ b/llvm/test/tools/llvm-objcopy/tool-name.test @@ -4,8 +4,9 @@ # RUN: rm -rf %t # RUN: mkdir %t -# RUN: ln -s llvm-objcopy %t/llvm-objcopy-11.exe -# RUN: ln -s llvm-objcopy %t/powerpc64-unknown-freebsd13-objcopy +# RUN: EXE=$(command -v llvm-objcopy) +# RUN: ln -s $EXE %t/llvm-objcopy-11.exe +# RUN: ln -s $EXE %t/powerpc64-unknown-freebsd13-objcopy # RUN: llvm-objcopy --help | FileCheck --check-prefix=OBJCOPY %s # RUN: %t/llvm-objcopy-11.exe --help | FileCheck --check-prefix=OBJCOPY %s @@ -13,8 +14,8 @@ # OBJCOPY: OVERVIEW: llvm-objcopy tool -# RUN: ln -s llvm-strip %t/strip.exe -# RUN: ln -s llvm-strip %t/gnu-llvm-strip-10 +# RUN: ln -s $EXE %t/strip.exe +# RUN: ln -s $EXE %t/gnu-llvm-strip-10 # RUN: llvm-strip --help | FileCheck --check-prefix=STRIP %s # RUN: %t/strip.exe --help | FileCheck --check-prefix=STRIP %s @@ -23,8 +24,8 @@ # STRIP: OVERVIEW: llvm-strip tool ## This driver emulates install_name_tool on macOS. -# RUN: ln -s llvm-install-name-tool %t/llvm-install-name-tool-10 -# RUN: ln -s llvm-install-name-tool %t/install_name_tool.exe +# RUN: ln -s $EXE %t/llvm-install-name-tool-10 +# RUN: ln -s $EXE %t/install_name_tool.exe # RUN: llvm-install-name-tool --help | FileCheck --check-prefix=INSTALL %s # RUN: %t/llvm-install-name-tool-10 --help | FileCheck --check-prefix=INSTALL %s diff --git a/llvm/test/tools/llvm-objdump/tool-name.test b/llvm/test/tools/llvm-objdump/tool-name.test --- a/llvm/test/tools/llvm-objdump/tool-name.test +++ b/llvm/test/tools/llvm-objdump/tool-name.test @@ -4,8 +4,9 @@ # RUN: rm -rf %t # RUN: mkdir %t -# RUN: ln -s llvm-objdump %t/llvm-otool-11.exe -# RUN: ln -s llvm-objdump %t/powerpc64-unknown-freebsd13-objdump +# RUN: EXE=$(command -v llvm-objdump) +# RUN: ln -s $EXE %t/llvm-otool-11.exe +# RUN: ln -s $EXE %t/powerpc64-unknown-freebsd13-objdump # RUN: %t/llvm-otool-11.exe --help | FileCheck --check-prefix=OTOOL %s # RUN: %t/powerpc64-unknown-freebsd13-objdump --help | \ diff --git a/llvm/test/tools/llvm-ranlib/tool-name.test b/llvm/test/tools/llvm-ranlib/tool-name.test --- a/llvm/test/tools/llvm-ranlib/tool-name.test +++ b/llvm/test/tools/llvm-ranlib/tool-name.test @@ -3,8 +3,9 @@ # RUN: rm -rf %t # RUN: mkdir %t -# RUN: ln -s llvm-ranlib %t/llvm-ranlib-9 -# RUN: ln -s llvm-ranlib %t/ranlib.exe +# RUN: EXE=$(command -v llvm-ranlib) +# RUN: ln -s $EXE %t/llvm-ranlib-9 +# RUN: ln -s $EXE %t/ranlib.exe # RUN: llvm-ranlib -h | FileCheck %s # RUN: %t/llvm-ranlib-9 -h | FileCheck %s