<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/90212>90212</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[build system] Wrong clang-$VERSION installed if I checkout to other release
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
GwenTheKween
</td>
</tr>
</table>
<pre>
I was trying to track down which clang release changed some behavior, and tried compiling many major versions of clang. However, they would always be installed as `clang-19` in my system.
my steps were:
```
mkdir build
cd build
cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local/bin -G "Unix Makefiles" ../llvm
make -j $(nproc) && sudo make isntall
git checkout llvmorg-16.0.0
make -j $(nproc) && sudo make install
```
After the final command, I expected both `clang-19` and `clang-16` to be found in `/usr/local/bin` but I could only see `clang-19` in it
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUU1FvozgX_TXm5SoIDCHDAw9pSebLN2mnajuzu0-RsS_gxtiRbcrk368M7c7sqg-7EjLi-tyDfe45zDnZacSKrG_Iuo7Y6Htjq88T6ucev0yIOmqMuFYHmJgDb69Sd-ANeMv4GYSZNEy95D1wxXQHFhUyh8B7pjsU4MyA0GDPXqWxhN4C0wK8lSiAm-EiVaAbmL7CwF6MhVe0ThrtwLQLYwz_MxO-4tzse7zCZEYlgKmJXR00CFI7z5RCAcwBKZK5bZWWpEhAahiu4K7O4xCTpCbJdllD1ePFwYQWSbb9dY8UyduzQM9CWmhGqcRS4OJvXwM7I6zq4_H73Wl3v7057k4Pj1__v7t9fiJZvciyqm_vtl92p8P90_P2eDw9PO72h99JVhO6H50ldK8MZ-ov3M23w7E-Pf_xsCNZ_fim6b8kIXTfSA2rz0Ao_ablD7hjZ2ylQkcohTgOQPU6vN1uPv0LEJoT-klfrOGElkBoQWgBbhQGZoh0Oqi8NHXSA--Rn83oIXAZ263SIk7i5D-yLrP7UPdl3bYebRg8tFIzFVwzMC2CGw6APy7IPQpojO__OfvgtJ-lIpS8CYZpzahFsEb41QfSBWQzejgAn61mtLqCQ_zAXNJHospEmZUswirdpHmalZRmUV-1tM05brCl601Jy6Zp1iViU3CeFWmZF5GsaELzJKdFmuWbJIvzTSbSpNiIdJPwpvxE8gQHJlUcFI6N7SLp3IhVmdCURoo1qNycW0o1TjBvEkpDjG0VelbN2DmSJ0o6736yeOnVHPjZxW_pIOsafrNGd0vsVoTm33ePT4ev978ETLZBlPfBewPG92jfQx-NVlW99xcXAkX3hO476fuxibkZ3k23vFYXa16Qe0L387Edofv5Wn8GAAD__6r0beo">