[llvm-dev] Use of host/target compiler when building compiler-rt

David Blaikie via llvm-dev llvm-dev at lists.llvm.org
Thu Mar 9 11:21:42 PST 2017


On Wed, Mar 8, 2017 at 4:48 PM Matthias Braun <mbraun at apple.com> wrote:

> On Mar 8, 2017, at 4:44 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
>
> On Wed, Mar 8, 2017 at 3:52 PM Matthias Braun via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> On Mar 8, 2017, at 3:14 PM, Chris Bieneman via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>
> On Mar 8, 2017, at 3:08 PM, Hal Finkel <hfinkel at anl.gov> wrote:
>
>
> On 03/08/2017 04:55 PM, Chris Bieneman via llvm-dev wrote:
>
> David,
>
> This is an area that has had a lot of development over the last two years.
>
> There are two supported ways in the LLVM build system to build compiler-rt
> with the just-built compiler.
>
> 1) The legacy way is for if compiler-rt is under LLVM/projects. You can
> specify -DLLVM_BUILD_EXTERNAL_COMPILER_RT=On, which will configure
> compiler-rt using the just-built clang after clang is built.
>
>
> Why is this not the default?
>
>
> Two reasons. (1) It is buggy, and nobody fixed the issues because (2) the
> long-term plan is to not support building compiler-rt (or any other runtime
> library) under llvm/projects. The goal is to migrate entirely to
> llvm/runtimes where the support is more complete.
>
>
> From a compiler developers point of view I wanted to stress that we at
> least should keep the option not to do it, as in my experience development
> workflow heavily slows down if you have to wait around for compiler-rt to
> rebuild after every small change you make to the compiler.
>
>
> If that's a valid option, I'd be open to it - it does really slow down the
> dev cycle & it's one of the reasons I often end up moving compiler-rt
> out/not building it anymore.
>
> I'm not sure if that's an option at the moment - if it is, I'd love to
> know how to do that & it might at least unblock my use case anyway, even if
> there's still a need for a broader fix.
>
> The legacy way (I wasn't aware it is legacy) of
> "-DLLVM_BUILD_EXTERNAL_COMPILER_RT=On/Off" has worked fine for me so far.
>

Hmm, it's set to "OFF" for me, but the unit tests are still compiled/linked
with the just-built clang. Is that not the case for you?

I'm assuming it was setup that way because the compiler-rt for the
sanitizers are end-to-end and so need the just-built clang to be able to
build a sanitized binary, etc. So I'm not sure how this could work
/entirely/ using the host compiler and never using the just-built compiler.


> I haven't tried the runtimes directory style yet, but it looks like a
> nicer more explicit way than specifying cmake flags and is just suffering
> from a bit probably?
>
> - Matthias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170309/773a9b0b/attachment.html>


More information about the llvm-dev mailing list