From 96bd02d6d9b98cc3d414d1f55bdce284f81f9333 Mon Sep 17 00:00:00 2001 From: Edward Thomson Date: Mon, 15 Jul 2019 19:22:58 +0100 Subject: [PATCH] ci: allow LLVM to be pre-installed Some machines may have LLVM installed already; use an environment variable to avoid attempting to reinstall. --- .azure-pipelines/steps/install-clang.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.azure-pipelines/steps/install-clang.yml b/.azure-pipelines/steps/install-clang.yml index 0cd6f24e32c7c..0e3268304e8bc 100644 --- a/.azure-pipelines/steps/install-clang.yml +++ b/.azure-pipelines/steps/install-clang.yml @@ -27,9 +27,11 @@ steps: # Original downloaded here came from # http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe - script: | - 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" - set CLANG_DIR=%CD%\citools\clang-rust - %TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR% + if NOT DEFINED CLANG_DIR ( + 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" + set CLANG_DIR=%CD%\citools\clang-rust + %TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR% + ) set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS% condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))