diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-11-04 19:56:08 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-04 19:56:08 +0200 |
commit | 1eb455f8696643b625b10a85551ff9fd28dd7d2a (patch) | |
tree | f6fa0bb549b609d3db1fea05181e7ff92c6b1fa3 /ci | |
parent | 253c581412d7f2b09af353dd83d943454bd555be (diff) | |
parent | ac6d4338cce68f5040825fb9bfb95dd147390e76 (diff) | |
download | meson-1eb455f8696643b625b10a85551ff9fd28dd7d2a.zip meson-1eb455f8696643b625b10a85551ff9fd28dd7d2a.tar.gz meson-1eb455f8696643b625b10a85551ff9fd28dd7d2a.tar.bz2 |
Merge pull request #4250 from jon-turney/windows-clang-cl
Add support for clang-cl on Windows
Diffstat (limited to 'ci')
-rw-r--r-- | ci/azure-steps.yml | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/ci/azure-steps.yml b/ci/azure-steps.yml index 5c4a058..6303761 100644 --- a/ci/azure-steps.yml +++ b/ci/azure-steps.yml @@ -48,13 +48,34 @@ 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', '') + } else { + $vsver = '2017' + } Set-PSRepository -Name PSGallery -InstallationPolicy Trusted Install-Module Pscx -Scope CurrentUser -AllowClobber Install-Module VSSetup -Scope CurrentUser - $vsver = $env:compiler.Replace('msvc', '') Import-VisualStudioVars -VisualStudioVersion $vsver -Architecture $(arch) + 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 # (always use 32-bit tool, as there doesn't seem to be a 64-bit tool) if ((Get-Command "resgen.exe" -ErrorAction SilentlyContinue) -eq $null) { |