Managing two versions of LLVM on the computer?

I wanted to try installing both LLVM 8 and 9 on the same machine and managing them with a version control system, but is this possible? And if so, would Git be a good version control system to use? How do LLVM developers use it for that (if they do)?

I haven’t heard of anyone doing that - I’d personally build and install them with different suffixes (so you’d have “clang-8” and “clang-7” or the like).

Hi Osman,

Not sure if I understood correctly, what is the role of Git in this scenario?
For my use cases I just copy a number of precompiled versions[1] of LLVM and put them under /opt/llvm/. Here is how it looks like on my machine:

ls /opt/llvm/

3.8.0 3.9.0 4.0.0 5.0.0 6.0.0 7.0.0 8.0.0 monorepo

Then ,when I need to use a different version to compile something I usually override compiler using environment variables, e.g.:

export CC=/opt/llvm/3.9.0/bin/clang
export CXX=/opt/llvm/3.9.0/bin/clang++
cmake or whatever else is needed

I hope it helps.