Dennis Luehring via llvm-dev
2018-Sep-19 16:50 UTC
[llvm-dev] Can i reduce my clang/JIT app in size?
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?
mayuyu.io via llvm-dev
2018-Sep-19 16:54 UTC
[llvm-dev] Can i reduce my clang/JIT app in size?
Have you tried building LLVM in MinSizeRelease and only enable X64 backend? Other aspects might require some advanced modification to LLVM/Clang’s source which I’m no professional with Zhang> 在 2018年9月19日,17:50,Dennis Luehring via llvm-dev <llvm-dev at lists.llvm.org> 写道: > > 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
mayuyu.io via llvm-dev
2018-Sep-19 16:58 UTC
[llvm-dev] Can i reduce my clang/JIT app in size?
libClang’s EmitLLVMAction(or whatever its called) + LLVM’s MCJIT( skipping all optimizations as a whole) should in theory IMHO achieve what you need. I’m not sure if there are extra internal dependencies though. Zhang> 在 2018年9月19日,17:54,mayuyu.io via llvm-dev <llvm-dev at lists.llvm.org> 写道: > > Have you tried building LLVM in MinSizeRelease and only enable X64 backend? > Other aspects might require some advanced modification to LLVM/Clang’s source which I’m no professional with > > Zhang > >> 在 2018年9月19日,17:50,Dennis Luehring via llvm-dev <llvm-dev at lists.llvm.org> 写道: >> >> 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 > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Dennis Luehring via llvm-dev
2018-Sep-19 16:59 UTC
[llvm-dev] Can i reduce my clang/JIT app in size?
>and only enable X64 backend?im on Win7 x64 so i the CMaker parameter enables only the x64 backed -DLLVM_TARGETS_TO_BUILD=host will try MinSizeRelease Am 19.09.2018 um 18:54 schrieb mayuyu.io:> Have you tried building LLVM in MinSizeRelease and only enable X64 backend? > Other aspects might require some advanced modification to LLVM/Clang’s source which I’m no professional with > > Zhang > > > 在 2018年9月19日,17:50,Dennis Luehring via llvm-dev <llvm-dev at lists.llvm.org> 写道: > > > > 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 > > >
Stefan Gränitz via llvm-dev
2018-Sep-27 19:44 UTC
[llvm-dev] Can i reduce my clang/JIT app in size?
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 at gmail.com