<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/55043>55043</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
Compiling libclang without compiling clang
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jcelerier
</td>
</tr>
</table>
<pre>
Hello,
I have a project which uses libclang but not the clang executable.
- If I pass `-DLLVM_ENABLE_PROJECTS="clang" -DLLVM_INCLUDE_TOOLS=1 -DLLVM_BUILD_TOOLS=1 ` to CMake, I get libLLVM<everything>.a, libClang<everything>.a and also a ton of binaries that I don't need but waste 1.7 gigabyte of disk space in my install folder's `bin/`
- If I pass `-DLLVM_ENABLE_PROJECTS="clang" -DLLVM_INCLUDE_TOOLS=0 -DLLVM_BUILD_TOOLS=0` instead, then I don't get any tools built (good!) but I also don't get any of the libClang libraries :( it seems that in this case the clang project gets entirely disabled.
How can I get the libClang<...>.a without having a build with all the clang binaries ? I cannot remove them afterwards because they are referenced in the llvm's Targets.cmake generated file which my project uses to link against LLVM, and if any file that was installed is missing, it causes a hard CMake error.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy1U0tv2zAM_jXKhajhR9KkBx_aJEUzpOuwtbsWtE3bamUrkORk-fej5KTLNuw4wLBlkSL5PVTo6pg_kFJapEsRr0R8u4EW9wQIO6PfqHRwaGXZwmDJgpJFqbBvoBgc9NqBawnGHfpB5eCwUBSNdcb3FWxq2MAOrQVxHV-tttvvj6_rz7d32_Xrl69Pn9bL528iW4k0DXX4C6ekzefl9mW1fn1-etr6lATOkbuXzXZ1sc-FwWlYPuI7MQ7u15Dzw_pskS1pT-boWsnls3WEPoWDy9DvryhgXwEqq5kCp3vQNRSyRyMZv2vRcfVK9yKdMwNEVaDigNYRJNEcGtlgceQfPlZJ-w52hyWB7KE78ts6VApqrSoyXCJwwtVFes-L_8Rb_A_eYk-bH4mw8pSwlv0FOE8h9kfmQCvLKKVyINJFozVnJyK9Ccg3I1V_HmL03hpnlv3CjBSK7JargHRgiboTpUwPC2ChREsXnjo7kKtaoN5JQ-roafU2q37z2YM-8On-JP1lb1Y4iqJR2oN0reap2eEsNwvsYVVhG7wwv1p_SC6yey7Kpb3dDXV6HybsAGtH5oCmYnKoxGGc_AhoiPNqMtSXbI8AjadR-y4I_ozGw4nKjs3Kw_Zk0HFeLRWdrho75Yw83Dq2tpL9O2CDXi4IrmbBvFFlHfgOpwOVbMWzz3x3C5201nubDzDpYVDLyFuefLwxQMZoE02qPKtushucOOkU5Uvd7aSSo3gjKWf6yo9Q2J8MRuWtczsbxL3np-HMoYg4kX9G7OFzdQLGvzzWQJYXs1k8zSZtvsAyTmJELOL0OsEkK-lmMU0wu86yOq1worAgZXMxu2O393SAUILXYraayDyN0zSepmkyn6bTJIqTOinrmqbzbFEusoWYxtShVJGfI9KmmZg8jFQMjeWgkpZl-QjyxZMNX_DQjuvjwNhN_laSIjaGmYTmeRj-J5NsuHE">