]> git.lizzy.rs Git - rust.git/blob - .azure-pipelines/steps/install-clang.yml
Rollup merge of #61389 - Zoxc:arena-cleanup, r=eddyb
[rust.git] / .azure-pipelines / steps / install-clang.yml
1 steps:
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 - script: |
30     powershell -Command "$ProgressPreference = 'SilentlyContinue'; iwr -outf %TEMP%\LLVM-7.0.0-win64.exe https://rust-lang-ci2.s3.amazonaws.com/rust-ci-mirror/LLVM-7.0.0-win64.exe"
31     set CLANG_DIR=%CD%\citools\clang-rust
32     %TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR%
33     set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe
34     echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS%
35   condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
36   displayName: Install clang (Windows)
37
38 # Note that we don't install clang on Linux since its compiler story is just so
39 # different. Each container has its own toolchain configured appropriately
40 # already.