[llvm-dev] Compiler support in libc++

Petr Hosek via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 3 22:19:16 PST 2021


On Wed, Mar 3, 2021 at 9:06 PM Mehdi AMINI via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

>
>
> On Wed, Mar 3, 2021 at 5:34 PM Michael Kruse <llvmdev at meinersbur.de>
> wrote:
>
>> Am Mi., 3. März 2021 um 13:18 Uhr schrieb Mehdi AMINI via llvm-dev
>> <llvm-dev at lists.llvm.org>:
>> > That's a good point:
>> >  - stage1: build just clang with host clang-8/libstdc++
>> > - stage1.5: build libc++ with stage1 clang
>> > - stage 2: assemble toolchain with clang from stage1 and libc++ from
>> stage2
>> > - stage3: build test "anything" using stage2 (`ninja check-all` in the
>> monorepo for example, but applicable to any other external project)
>>
>> Stage 1.5 is exactly what cmake
>> -DLLVM_ENABLE_RUNTIMES=libcxxabi;libcxx should do.
>
>
> Fantastic! It looks like the cmake option I was suggesting already exists
> actually :)
>
> I had to read our CMake scripts to figure out how to use it though,
>

Documentation is definitely something that needs improving since right now
it's basically completely absent.


> looking at
> https://llvm.org/docs/BuildingADistribution.html#relevant-cmake-options
> 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?
>

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.


> 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.
>

That's also something we could improve.


> Anyway, I need to update the bot config to see if this "just works", but
> locally it seems promising!
>

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.


> Thanks Michael!
>
> --
> Mehdi
>
>
>
>
>
>>
>> When I last looked at it, it did work and haven't noticed work on that
>> front. However, I just re-tried and it actually does work. Thanks to
>> anyone who fixed it ;-)
>>
>> Michael
>>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210303/c73ee6cf/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3996 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20210303/c73ee6cf/attachment.bin>


More information about the llvm-dev mailing list