<div dir="ltr"><div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 3, 2021 at 9:06 PM Mehdi AMINI via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Mar 3, 2021 at 5:34 PM Michael Kruse <<a href="mailto:llvmdev@meinersbur.de" target="_blank">llvmdev@meinersbur.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Am Mi., 3. März 2021 um 13:18 Uhr schrieb Mehdi AMINI via llvm-dev<br>
<<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>>:<br>
> That's a good point:<br>
>  - stage1: build just clang with host clang-8/libstdc++<br>
> - stage1.5: build libc++ with stage1 clang<br>
> - stage 2: assemble toolchain with clang from stage1 and libc++ from stage2<br>
> - stage3: build test "anything" using stage2 (`ninja check-all` in the monorepo for example, but applicable to any other external project)<br>
<br>
Stage 1.5 is exactly what cmake<br>
-DLLVM_ENABLE_RUNTIMES=libcxxabi;libcxx should do.  </blockquote><div><br></div><div>Fantastic! It looks like the cmake option I was suggesting already exists actually :)</div><div><br></div><div>I had to read our CMake scripts to figure out how to use it though,</div></div></div></div></blockquote><div><br></div><div>Documentation is definitely something that needs improving since right now it's basically completely absent.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>looking at <a href="https://llvm.org/docs/BuildingADistribution.html#relevant-cmake-options" target="_blank">https://llvm.org/docs/BuildingADistribution.html#relevant-cmake-options</a> it mentions the CMake option, but just running locally `ninja` does not get them to be built, I had to explicitly call `ninja runtimes` to get libc++ to be built, I don't know if this is intended?</div></div></div></div></blockquote><div><br></div><div>In all our examples, we always use `ninja distribution` and include `runtimes` in `LLVM_DISTRIBUTION_COMPONENTS` and I haven't thought of also including `runtimes` in the default target, but it makes sense and should be easy to fix.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>I also need to explicitly have `-DLLVM_ENABLE_PROJECTS=clang` by the way otherwise `ninja runtimes` will error out obscurely at some point, the cmake handling of this option isn't defensive about it at the moment.</div></div></div></div></blockquote><div><br></div><div>That's also something we could improve.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>Anyway, I need to update the bot config to see if this "just works", but locally it seems promising!</div></div></div></div></blockquote><div><br></div><div>The runtimes build is under active development and we're interested in hearing about issues so please let me know if you run into problems.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>Thanks Michael!</div><div><br></div><div>-- </div><div>Mehdi</div><div><br></div><div><br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
When I last looked at it, it did work and haven't noticed work on that<br>
front. However, I just re-tried and it actually does work. Thanks to<br>
anyone who fixed it ;-)<br>
<br>
Michael<br>
</blockquote></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>