Skip to content

Commit 23b8072

Browse files
committed
Use matis bash script instead of batch for fixing mingw on windows
1 parent 2f25959 commit 23b8072

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

ci/azure-install-rust.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,13 @@ steps:
4646
find "C:\ProgramData\Chocolatey" -name "libmsvcrt*"
4747
condition: eq( variables['Agent.OS'], 'Windows_NT' )
4848
displayName: Find GCC libraries (windows)
49-
- script: |
50-
@echo on
51-
if not defined TOOLCHAIN set TOOLCHAIN=nightly
52-
if defined ARCH_BITS for %%I in (crt2.o dllcrt2.o libmsvcrt.a) do xcopy /Y "C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw%ARCH_BITS%\%ARCH%-w64-mingw32\lib\%%I" "C:\Program Files\Rust\.rustup\toolchains\%TOOLCHAIN%-%TARGET%\lib\rustlib\%TARGET%\lib\%%I"
49+
- bash: |
50+
set -ex
51+
if [[ -n ${ARCH_BITS} ]]; then
52+
for i in crt2.o dllcrt2.o libmsvcrt.a ; do
53+
cp -f "/C/ProgramData/Chocolatey/lib/mingw/tools/install/mingw${ARCH_BITS}/${ARCH}-w64-mingw32/lib/$i" "`rustc --print sysroot`/lib/rustlib/${TARGET}/lib"
54+
done
55+
fi
5356
condition: eq( variables['Agent.OS'], 'Windows_NT' )
5457
displayName: Fix MinGW (windows)
5558
- bash: |

0 commit comments

Comments
 (0)