fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
2.1 KiB46 linesraw
1steps:
2
3- bash: |
4    set -e
5    curl -f http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz | tar xJf -
6
7    export CC=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang
8    echo "##vso[task.setvariable variable=CC]$CC"
9
10    export CXX=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang++
11    echo "##vso[task.setvariable variable=CXX]$CXX"
12
13    # Configure `AR` specifically so rustbuild doesn't try to infer it as
14    # `clang-ar` by accident.
15    echo "##vso[task.setvariable variable=AR]ar"
16  displayName: Install clang (OSX)
17  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
18
19# If we're compiling for MSVC then we, like most other distribution builders,
20# switch to clang as the compiler. This'll allow us eventually to enable LTO
21# amongst LLVM and rustc. Note that we only do this on MSVC as I don't think
22# clang has an output mode compatible with MinGW that we need. If it does we
23# should switch to clang for MinGW as well!
24#
25# Note that the LLVM installer is an NSIS installer
26#
27# Original downloaded here came from
28# http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe
29# That installer was run through `wine` on Linux and then the resulting
30# installation directory (found in `$HOME/.wine/drive_c/Program Files/LLVM`) was
31# packaged up into a tarball. We've had issues otherwise that the installer will
32# randomly hang, provide not a lot of useful information, pollute global state,
33# etc. In general the tarball is just more confined and easier to deal with when
34# working with various CI environments.
35- bash: |
36    set -e
37    mkdir -p citools
38    cd citools
39    curl -f https://rust-lang-ci-mirrors.s3-us-west-1.amazonaws.com/rustc/LLVM-7.0.0-win64.tar.gz | tar xzf -
40    echo "##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]$RUST_CONFIGURE_ARGS --set llvm.clang-cl=`pwd`/clang-rust/bin/clang-cl.exe"
41  condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
42  displayName: Install clang (Windows)
43
44# Note that we don't install clang on Linux since its compiler story is just so
45# different. Each container has its own toolchain configured appropriately
46# already.