[cfe-dev] [llvm-dev] Build clang front end only for few languages ( say C and C++ )

Nitish Srivastava via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 22 10:55:56 PDT 2017


Hi Vedant,

  Clang + llvm build together takes around 26 GB. I was curious if there
are any tricks to reduce the size as I need only C and C++ languages in
frontend and RISCV ISA for llvm backend. For the backend I am already
passing -DLLVM_TARGETS_TO_BUILD=RISCV to generate the backend only for
RISCV. I was curious if I can do something to reduce the size of the clang
build.

  Thanks,

Best Regards,
Nitish



‌

On Fri, Sep 22, 2017 at 1:47 PM, Vedant Kumar <vsk at apple.com> wrote:

> - llvm-dev, + cfe-dev (moving off llvm-dev)
>
> Hi Nitish,
>
> On Sep 22, 2017, at 10:32 AM, Nitish Srivastava via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> Hi,
>
>  I am trying to build clang, however the build size is quite large. As
> clang supports non-C family languages as well ( e.g. Java, Fortran ),
>
>
> Clang does not accept Java or Fortran code. It links llvm, which has some
> language-specific support for calling conventions, but excising this
> support might not save you much in terms of binary size.
>
> is there a way to turn that off during the build. I just want to have
> support for C and C++ and don't care about other languages.
>
> Is there a CMake option that needs to be set to do that??
>
>
> What are you measuring exactly? Is it the size of the build directory, the
> size of the clang binary itself, or something else?
>
> How small does clang need to be for your purposes?
>
> vedant
>
>
> Thanks a lot!
>
> Best Regards,
>
> Nitish
>
>
>> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170922/7ab0035e/attachment.html>


More information about the cfe-dev mailing list