llvm

How can i download and install llvm on Ubuntu 18.04?


I have llvm-6.0 and I don't know how to download and install llvm-7.0 on Ubuntu 18.04? Can I install it from terminal or I download from a site?


Solution

  • There are basically two ways to install LLVM on your Ubuntu 18.04 machine:

    Considering your question, it seems you would like to have a binary version of LLVM. Therefore you can install LLVM from your Ubuntu 18.04 terminal as following:

    First of all, you should update packages as following:

    However, for custom LLVM i.e. in your case LLVM 7:

    Do you want some LLVM-7 examples?

    Do you want to remove LLVM-6?

    For default LLVM installation you should run following (not for your case):

    However, currently the last version of LLVM is LLVM 13.0. 1. It is better to install the latest version.