Code change:
# # Note that we don't literally overwrite the gdb.exe binary because it appears # to just use gdborig.exe, so that's the binary we deal with instead. <del> - script: | powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %MINGW_ARCHIVE% %MINGW_URL%/%MINGW_ARCHIVE%" 7z x -y %MINGW_ARCHIVE% > nul powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_URL%/2017-04-20-%MSYS_BITS%bit-gdborig.exe" mv 2017-04-20-%MSYS_BITS%bit-gdborig.exe %MINGW_DIR%bingdborig.exe echo ##vso[task.prependpath]%CD%%MINGW_DIR%bin </del> <ins> - bash: | set -e curl -o mingw.7z $MINGW_URL/$MINGW_ARCHIVE 7z x -y mingw.7z > /dev/null curl -o $MINGW_DIR/bin/gdborig.exe $MINGW_URL/2017-04-20-${MSYS_BITS}bit-gdborig.exe echo "##vso[task.prependpath]`pwd`/$MINGW_DIR/bin" </ins> condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],'')) displayName: Download custom MinGW <del> # Otherwise pull in the MinGW installed on appveyor - script: | echo ##vso[task.prependpath]%MSYS_PATH%mingw%MSYS_BITS%bin </del> <ins> # Otherwise install MinGW through `pacman` - bash: | set -e arch=i686 if [ "$MSYS_BITS" = "64" ]; then arch=x86_64 fi pacman -S --noconfirm --needed mingw-w64-$arch-toolchain mingw-w64-$arch-cmake mingw-w64-$arch-gcc mingw-w64-$arch-python2 echo "##vso[task.prependpath]$(System.Workfolder)/msys2/mingw$MSYS_BITS/bin" </ins> condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],'')) <del> displayName: Add MinGW to path </del> <ins> displayName: Download standard MinGW </ins> # Make sure we use the native python interpreter instead of some msys equivalent # one way or another. The msys interpreters seem to have weird path conversions # baked in which break LLVM's build system one way or another, so let's use the # native version which keeps everything as native as possible. <del> - script: | copy C:Python27amd64python.exe C:Python27amd64python2.7.exe echo ##vso[task.prependpath]C:Python27amd64 </del> <ins> - bash: | set -e cp C:/Python27amd64/python.exe C:/Python27amd64/python2.7.exe echo "##vso[task.prependpath]C:/Python27amd64" </ins> displayName: Prefer the "native" Python as LLVM has trouble building with MSYS sometimes condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) # Note that this is originally from the github releases patch of Ninja <del> - script: | md ninja powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf 2017-03-15-ninja-win.zip https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-03-15-ninja-win.zip" 7z x -oninja 2017-03-15-ninja-win.zip del 2017-03-15-ninja-win.zip set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --enable-ninja echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS% echo ##vso[task.prependpath]%CD%ninja </del> <ins> - bash: | set -e mkdir ninja curl -o ninja.zip https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-03-15-ninja-win.zip 7z x -oninja ninja.zip rm ninja.zip echo "##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]$RUST_CONFIGURE_ARGS --enable-ninja" echo "##vso[task.prependpath]`pwd`/ninja" </ins> displayName: Download and install ninja condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))

Related discussion:
text: The "Install MSYS2" step of failed, but the build kept going and failed later with obscure errors. We should fix this so that if msys2 installation fails the build fails immediately!