[LLVMdev] Reducing the size of LLVM and clang

Daniel Dunbar daniel at zuster.org
Thu Jun 10 07:23:05 PDT 2010


Hi Rob,

There is no way to compile Clang to support only one language right
now, and it would probably provide only a marginal size win. Your best
place to focus attention is on pieces of the LLVM backend that you
don't need. For example, I added support for reading LLVM files
directly which added in the asmparser library, but you can get
eliminate that (with some code editing, we don't currently have any
support for conditionalizing these things).

Note that compiling with Clang or llvm-gcc, especially at -Os, will
also give a pretty major code size improvement.

 - Daniel

On Thu, Jun 10, 2010 at 6:06 AM, Robert Quill <robert.quill at imgtec.com> wrote:
> Hi all,
>
> We are looking to try and reduce the size of the clang and LLVM
> libraries and were wondering if anyone had any advice on how to do this.
> All we want is to be able to compile from a single language to a single
> back-end and for that back-end to emit instructions; we don't care about
> anything else. Currently we are building LLVM to use only our target, so
> that is OK. Is it possible to build clang with support for only one
> language? Or does anyone else have any tips about how to reduce the size
> of the libraries?
>
> Thanks for your help,
> Rob
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>




More information about the llvm-dev mailing list