3

I use Spacemacs, and installed llvm-10, clnag-10, clangd-10, and all related packages, in Debian 10.

Used the following command to install llvm

$ sudo bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"

Then, changed clangd-10 to clangd using the following command:

$ sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-10 100

Now, how can I change the other packages like clang-10, llvm-10, lldb-10, lld-10 etc. to clang, llvm, lldb, lld, etc.?

Because, I have to compile like $ clang-10 hello.c instead of $ clang hello.c

tom_kp
  • 33
  • 1
  • 4
  • 1
    Why not just add a hard or a soft link? – fpmurphy Jul 02 '20 at 16:52
  • 1
    @fpmurphy **Thanks for your help**: There are many files of llvm-10 in `/usr/bin/` folder. So, if I link the following 3 files, will that take care of other llvm-10 files? And, can I give a link to just 3 files only? `$ ln -s /usr/bin/clang-10 /usr/bin/clang` `$ ln -s /usr/bin/clang++-10 /usr/bin/clang++` `$ ln -s /usr/bin/clang-cpp-10 /usr/bin/clang-cpp` – tom_kp Jul 02 '20 at 23:12
  • 2
    Why not just use hard links? `ln /usr/bin/clang-10 /usr/bin/clang` and so on. Uses one less inode and is very slightly faster. – fpmurphy Jul 03 '20 at 03:33
  • @fpmurphy Thanks again. Per your suggestion, I removed symlink, and added hardlink, for clang and clang++. clangd was already done earlier. And it works fine. Can you please make it as a structured answer so that I can accept it? – tom_kp Jul 03 '20 at 06:31

0 Answers0