fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1steps: 2# We use the WIX toolset to create combined installers for Windows, and these 3# binaries are downloaded from 4# https://github.com/wixtoolset/wix3 originally 5- bash: | 6 set -e 7 curl -O https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/wix311-binaries.zip 8 echo "##vso[task.setvariable variable=WIX]`pwd`/wix" 9 mkdir -p wix/bin 10 cd wix/bin 11 7z x ../../wix311-binaries.zip 12 displayName: Install wix 13 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) 14 15# We use InnoSetup and its `iscc` program to also create combined installers. 16# Honestly at this point WIX above and `iscc` are just holdovers from 17# oh-so-long-ago and are required for creating installers on Windows. I think 18# one is MSI installers and one is EXE, but they're not used so frequently at 19# this point anyway so perhaps it's a wash! 20- script: | 21 echo ##vso[task.prependpath]C:\Program Files (x86)\Inno Setup 5 22 curl.exe -o is-install.exe https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-08-22-is.exe 23 is-install.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP- 24 displayName: Install InnoSetup 25 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) 26 27# We've had issues with the default drive in use running out of space during a 28# build, and it looks like the `C:` drive has more space than the default `D:` 29# drive. We should probably confirm this with the azure pipelines team at some 30# point, but this seems to fix our "disk space full" problems. 31- script: | 32 mkdir c:\MORE_SPACE 33 mklink /J build c:\MORE_SPACE 34 displayName: "Ensure build happens on C:/ instead of D:/" 35 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) 36 37- bash: git config --replace-all --global core.autocrlf false 38 displayName: "Disable git automatic line ending conversion (on C:/)" 39 40# Download and install MSYS2, needed primarily for the test suite (run-make) but 41# also used by the MinGW toolchain for assembling things. 42# 43# FIXME: we should probe the default azure image and see if we can use the MSYS2 44# toolchain there. (if there's even one there). For now though this gets the job 45# done. 46- bash: | 47 set -e 48 choco install msys2 --params="/InstallDir:$(System.Workfolder)/msys2 /NoPath" -y --no-progress 49 echo "##vso[task.prependpath]$(System.Workfolder)/msys2/usr/bin" 50 mkdir -p "$(System.Workfolder)/msys2/home/$USERNAME" 51 displayName: Install msys2 52 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) 53 54- bash: pacman -S --noconfirm --needed base-devel ca-certificates make diffutils tar 55 displayName: Install msys2 base deps 56 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) 57 58# If we need to download a custom MinGW, do so here and set the path 59# appropriately. 60# 61# Here we also do a pretty heinous thing which is to mangle the MinGW 62# installation we just downloaded. Currently, as of this writing, we're using 63# MinGW-w64 builds of gcc, and that's currently at 6.3.0. We use 6.3.0 as it 64# appears to be the first version which contains a fix for #40546, builds 65# randomly failing during LLVM due to ar.exe/ranlib.exe failures. 66# 67# Unfortunately, though, 6.3.0 *also* is the first version of MinGW-w64 builds 68# to contain a regression in gdb (#40184). As a result if we were to use the 69# gdb provided (7.11.1) then we would fail all debuginfo tests. 70# 71# In order to fix spurious failures (pretty high priority) we use 6.3.0. To 72# avoid disabling gdb tests we download an *old* version of gdb, specifically 73# that found inside the 6.2.0 distribution. We then overwrite the 6.3.0 gdb 74# with the 6.2.0 gdb to get tests passing. 75# 76# Note that we don't literally overwrite the gdb.exe binary because it appears 77# to just use gdborig.exe, so that's the binary we deal with instead. 78- bash: | 79 set -e 80 curl -o mingw.7z $MINGW_URL/$MINGW_ARCHIVE 81 7z x -y mingw.7z > /dev/null 82 curl -o $MINGW_DIR/bin/gdborig.exe $MINGW_URL/2017-04-20-${MSYS_BITS}bit-gdborig.exe 83 echo "##vso[task.prependpath]`pwd`/$MINGW_DIR/bin" 84 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), ne(variables['MINGW_URL'],'')) 85 displayName: Download custom MinGW 86 87# Otherwise install MinGW through `pacman` 88- bash: | 89 set -e 90 arch=i686 91 if [ "$MSYS_BITS" = "64" ]; then 92 arch=x86_64 93 fi 94 pacman -S --noconfirm --needed mingw-w64-$arch-toolchain mingw-w64-$arch-cmake mingw-w64-$arch-gcc mingw-w64-$arch-python2 95 echo "##vso[task.prependpath]$(System.Workfolder)/msys2/mingw$MSYS_BITS/bin" 96 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],'')) 97 displayName: Download standard MinGW 98 99# Make sure we use the native python interpreter instead of some msys equivalent 100# one way or another. The msys interpreters seem to have weird path conversions 101# baked in which break LLVM's build system one way or another, so let's use the 102# native version which keeps everything as native as possible. 103- bash: | 104 set -e 105 cp C:/Python27amd64/python.exe C:/Python27amd64/python2.7.exe 106 echo "##vso[task.prependpath]C:/Python27amd64" 107 displayName: Prefer the "native" Python as LLVM has trouble building with MSYS sometimes 108 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) 109 110# Note that this is originally from the github releases patch of Ninja 111- bash: | 112 set -e 113 mkdir ninja 114 curl -o ninja.zip https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/2017-03-15-ninja-win.zip 115 7z x -oninja ninja.zip 116 rm ninja.zip 117 echo "##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]$RUST_CONFIGURE_ARGS --enable-ninja" 118 echo "##vso[task.prependpath]`pwd`/ninja" 119 displayName: Download and install ninja 120 condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))