[llvm-dev] Can i reduce my clang/JIT app in size?

Stefan Gränitz via llvm-dev llvm-dev at lists.llvm.org
Thu Sep 27 12:44:20 PDT 2018


36MB is quite small already. I guess you already built only one backend?
(-DLLVM_TARGETS_TO_BUILD=host) I don't think it will get much smaller.

Your requirements, however, sound like you could easily use a more
specialized compiler, like TinyCC? If your project is LGPL compatible, I
am sure you can make it codegen to a memory buffer. NativeJIT has good
data structures for that. The bigger task then is resolving relocations
and figuring out dependencies (especially on Windows). I guess you could
find all that in LLVM and use it without the entire engine behind.

Am 19.09.18 um 18:50 schrieb Dennis Luehring via llvm-dev:
> i want to integrate a C source JITer into my application but the
> resulting executables are too large
>
> is it possible to reduce the resulting libs/exe some way?
> current VS2017/svn build example:
> llvm-build\Release\bin\clang-interpreter.exe ~36MB
>
> for now (that can change later)
> - i want to jit simple c-code
> - no std library or something
> - x64 only
> - no deep/full architecture optimization needed
> - no c++/templates etc.
>
> any ideas?
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-- 
https://weliveindetail.github.io/blog/
https://cryptup.org/pub/stefan.graenitz@gmail.com




More information about the llvm-dev mailing list