I have installed llvm 6,7,10,11 on my linux(Ubuntu 20.04) machine along with same clang versions. Different projects require different versions of llvm. How to compile c++ programs using a particular version of clang and llvm?
For example: currently llvm 10 and clang 10 are defaults and I use :
clang++ program_names.cpp ``llvm-config --cxxflags --ldflags --system-libs --libs core mcjit native`` -O3 -o program_name.cpp
It depends on your disctribution. On FreeBSD OS, for instance, all LLVM executables are appended with version number, so you can run clang80
, clang++90
, etc.
For each package you used, check the list of files it installs.