<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/57676>57676</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [Enhancement / cmake / clang] Ensuring that clang is installed/build via a cmake option
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          rubyFeedback
      </td>
    </tr>
</table>

<pre>
    It is proposed to add a commandline flag such as:

    -D_USE_CLANG=on

or

     -D_ENSURE_CLANG=on

What does this do?

It will ensure that llvm will compile only if clang can be compiled/installed as well.

Rationale and Background for this proposal:

I switched to git clone of the main git of llvm. When I did, that other error I
reported about the stable releases went away, and I managed to build
llvm. However had I forgot to build clang.

So now I am re-compiling llvm. This time I put clang/ and compiler-rt
into the same directory as llvm/.

As far as I know this suffices. Though it's not very user friendly.

But I am not 100% certain this will build clang. I work on multiple
computers and when things take some time I tend to forget what
I did. I use multiple tabs in konsole and firefox so I manage to
confuse myself even more. Yes, I can look at the history of 
commands I used, but I would actually prefer if there would be
a cmake option that means this:

"Ok, llvm, I'm gonna compile you, but I want to be 100% certain
that once you are all compiled, clang has also been compiled
as well."

Aka I want to ensure that my llvm has clang too. llvm without
clang is a sad panda (I'd even propose to integrate clang
and compiler-rt into the llvm releases; BLFS always recommends
both clang and compiler-rt so I would reason that the
main use case is to have all three:
https://www.linuxfromscratch.org/blfs/view/svn/general/llvm.html)

With such a flag I would be certain that the compilation ONLY
starts if clang can be found and installed too.

I am not sure whether many people would need this, probably
not. But either way I wanted to at the least give some impression
here and feedback - llvm is kind of a vital component for the
linux ecosystem these days, tons of things depend on it
(crystal, mesa etc...).

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx1VtFu2zgQ_Br5ZRHDkWM7fvBD08R3BoIUaK4o-lRQEmXxTJEGSVnV398sKbt2igsCWxHJ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