[cfe-dev] CMake builld system for compiler-rt rework

Richard Smith richard at metafoo.co.uk
Tue Oct 30 14:03:50 PDT 2012


On Tue, Oct 30, 2012 at 5:09 AM, Alexey Samsonov <samsonov at google.com> wrote:
> On Tue, Oct 30, 2012 at 3:58 PM, Evgeniy Stepanov <eugenis at google.com>
> wrote:
>> On Tue, Oct 30, 2012 at 2:03 PM, Alexey Samsonov <samsonov at google.com>
>> wrote:
>>> On Tue, Oct 30, 2012 at 1:50 PM, Alexey Samsonov <samsonov at google.com>
>>> wrote:
>>>>
>>>> Hi there!
>>>>
>>>> tl;dr we should build compiler-rt with just-built clang
[...]
>>>> We can try to resolve this by using recursive build trees:
>>>> * for each target create its own "recursive" LLVM build tree (e.g.
>>>> projects/compiler-rt/Linux-x86_64) and invoke CMake
>>>> there with some additional compile/link flags.
>>>> * describe a single target (say, "clang_rt") in a CMakeLists.txt in each
>>>> target-specific recursive build tree.
>>>> * Build rule for "clang_rt.linux-x86_64" in main build tree in  will
>>>> simply invoke building "clang_rt" in necessary
>>>> target-specific subtree and copy result from there.
>>>>
>>>> Overall, I believe this is doable (but pretty ugly) and have a raw
>>>> working prototype for this. If we decide to go this way,
>>>> I'm ready to complete this if anyone signs up for a careful review (as
>>>> my CMake skills are far from good).

This sounds good to me, but I'm hoping someone with more CMake
expertise can weigh in. Presumably this would not happen for a $BUILD
!= $HOST configuration, and we'd have some other mechanism to build
compiler-rt (either on $HOST with the just-built Clang, or with a
separate Clang built for $BUILD) in that case?

>> We need to have some kind of "fast" mode that would not rebuild runtime
>> every time.
>
>
> Yes, smth like "make clang-only" that wouldn't use fresh Clang to rebuild
> compiler-rt libraries.

Since we don't require compiler-rt to be checked out for a clang
build, I would expect "make clang" to not build compiler-rt, so that
seems like a natural way to request "fast" mode.



More information about the cfe-dev mailing list