5 curl -f http://releases.llvm.org/7.0.0/clang+llvm-7.0.0-x86_64-apple-darwin.tar.xz | tar xJf -
7 export CC=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang
8 echo "##vso[task.setvariable variable=CC]$CC"
10 export CXX=`pwd`/clang+llvm-7.0.0-x86_64-apple-darwin/bin/clang++
11 echo "##vso[task.setvariable variable=CXX]$CXX"
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'))
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!
25 # Note that the LLVM installer is an NSIS installer
27 # Original downloaded here came from
28 # http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe
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)
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