cpp_client_telemetry icon indicating copy to clipboard operation
cpp_client_telemetry copied to clipboard

setup-buildtools.cmd also install llvm it seems

Open bwilsonms opened this issue 3 years ago • 4 comments

Steps to reproduce. Download LLVM or have LLVM already installed

What is the expected behavior? Buildtools script to not use choco to install LLVM

What is the actual behavior? Chocolatey download llvm

bwilsonms avatar May 13 '22 12:05 bwilsonms

This script assumes that choco is available by default (and it is always there on GitHub Actions runners).

While LLVM is not always available (and by default, it is not usually available on GitHub Actions runners).

Unfortunately LLVM installs different versions under the same directory all the time. One option is to check if directory already exists and avoid the installation. However, in this case it'd be best to also check that the version actually installed matches the one that SDK is known to work well with. What would be your recommendation?

maxgolov avatar May 13 '22 17:05 maxgolov

You should be able to override this behavior by unsetting INSTALL_LLVM variable.

For cmd.exe

set INSTALL_LLVM=

For PowerShell

[Environment]::SetEnvironmentVariable('INSTALL_LLVM', $null, 'User')

maxgolov avatar May 13 '22 17:05 maxgolov

Does chocolatey have version checking already, I'm sorry I can check but thought I would ask. What if I install X and I already have X installed? With most packages when you already have something installed, the Chocolatey process will just perform the install again silently. Most times this means that it does nothing and in the end you have what you already had.

I think this is probably a non-factor all things considering, just wanted to mention what I saw. Feel free to close.

bwilsonms avatar May 13 '22 19:05 bwilsonms

I'm no longer actively working on core parts of the project. I'd let @lalitb comment on this. You can specify the version through the --version flag.. However, I don't think that the present setup script does specify concrete version. Maybe it'd make sense to make this configurable via env var.

Example:

choco install llvm --version=13.0.1

Chocolatey LLVM Package Version history

maxgolov avatar May 13 '22 20:05 maxgolov