[LLVMdev] A question about using LLVM in an embedded system
joe at x2a.org
Fri Oct 24 16:02:25 PDT 2008
> My question is "Are there any ways to reduce the disk space needed by LLVM?"
> if I don't need some optimization passes, can I use some preprocessor
> macros to disable that pieces of codes?
> If such preprocessor macros or other methods don't exist, are there
> any guide lines or suggestions I can follow to reduce the disk space
> Thank you all very much.
When you link your program link only the parts that you need.
llvm-config --components will tell you the components. For example, you
will need the codegen code, but not the .bc bitcode/assembly parser or
the JIT. When you statically link, you will only get the used functions
(and their dependencies) in your executable. If you need the actual
static library files on the device, I think you may be able to omit the
ones that you do not use.
Hope this is any help,
More information about the llvm-dev