llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.43k stars 11.75k forks source link

`make install` does not create versioned clang++ symlink (e.g. clang++-6.0) #28954

Open f1376df8-34bc-4756-9be6-f8bc6a69b887 opened 8 years ago

f1376df8-34bc-4756-9be6-f8bc6a69b887 commented 8 years ago
Bugzilla Link 28580
Version trunk
OS Linux
CC @pwnall

Extended Description

With Ubuntu 16.04 when I try to build llvm/clang from source with:

$ cmake -G "Unix Makefiles" ../llvm -DCMAKE_BUILD_TYPE=Release $ make -j4 $ sudo make install

The install script does generate a clang++ -> clang but NOT a clang++-3.9 -> clang so we have clang, clang++, clang-3.9, but no clang++-3.9

The nightly packages at http://apt.llvm.org/ creates a symlink, so for consistency and naming symmetry, I think the makefile install scripts should too.

llvmbot commented 6 years ago

The issue is not specific to clang 3.9, and it's still not resolved. The clang 6.0.0 binary distribution has clang-6.0 but not clang++-6.0

If I want to compile my C++ code with clang 6.0, which is not the default clang installation (e.g. /usr/bin/clang is clang 5.0), I have several options:

1) Compile and link with clang-6.0 (it recognizes C++ code by the extension), provide the C++ library manually.

2) Compile with clang-6.0, link with clang++.

3) Make clang++-6.0 a link to clang-6.0, compile and link with clang++-6.0.

The last approach looks most sane to me, but shouldn't the clang build system do it for me?

I was able to get Fedora make the symlink, but perhaps I should have start with the upstream first.

https://bugzilla.redhat.com/show_bug.cgi?id=1534098