aboutsummaryrefslogtreecommitdiff
path: root/ci
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2018-10-26 11:22:34 +0100
committerJon Turney <jon.turney@dronecode.org.uk>2018-11-04 15:42:06 +0000
commitd63a919e0e25d54485198d5c89ffebb1ae2d38a1 (patch)
treefa8fa7a05ff84c01a1785516b8c500995819a8f7 /ci
parentd2172a4780f06683b2417674fc85e862a7fa193b (diff)
downloadmeson-d63a919e0e25d54485198d5c89ffebb1ae2d38a1.zip
meson-d63a919e0e25d54485198d5c89ffebb1ae2d38a1.tar.gz
meson-d63a919e0e25d54485198d5c89ffebb1ae2d38a1.tar.bz2
azure: Remove MSVC tools from PATH for clang-cl job
Add Windows SDK tools to PATH (for rc). This requires INCLUDE to be set. lld-link doesn't seem to default to searching the correct directories, so LIB needs to be set. The easiest way to get the correct setting of INLCUDE and LIB env vars seems to be to import the VS env vars, then revert the PATH.
Diffstat (limited to 'ci')
-rw-r--r--ci/azure-steps.yml11
1 files changed, 9 insertions, 2 deletions
diff --git a/ci/azure-steps.yml b/ci/azure-steps.yml
index 40581c1..6303761 100644
--- a/ci/azure-steps.yml
+++ b/ci/azure-steps.yml
@@ -48,6 +48,7 @@ steps:
# add downloads to PATH
$env:Path = "$env:SYSTEM_WORKFOLDER;$env:Path"
+ $origPath = $env:Path
# import visual studio variables
if ($env:compiler -eq 'msvc2015') {
$vsver = $env:compiler.Replace('msvc', '')
@@ -59,14 +60,20 @@ steps:
Install-Module VSSetup -Scope CurrentUser
Import-VisualStudioVars -VisualStudioVersion $vsver -Architecture $(arch)
- # install llvm for clang-cl builds
- # (note that we use LIB, WINDRES from VS, so leave those in PATH)
if ($env:compiler -eq 'clang-cl') {
+ # drop visual studio from PATH
+ # (but leave INCLUDE, LIB and WindowsSdkDir environment variables set)
+ $env:Path = $origPath
+
+ # install llvm for clang-cl builds
DownloadFile -Source 'http://releases.llvm.org/7.0.0/LLVM-7.0.0-win64.exe' -Destination LLVM-7.0.0-win64.exe
Start-Process .\LLVM-7.0.0-win64.exe -ArgumentList '/S' -Wait
$env:Path = "C:\Program Files\LLVM\bin;$env:Path"
$env:CC = "clang-cl"
$env:CXX = "clang-cl"
+
+ # and use Windows SDK tools
+ $env:Path = "$env:WindowsSdkDir\bin\$env:Arch;$env:Path"
}
# add .NET framework tools to path for resgen for C# tests