Closed rdbo closed 1 year ago
Found a fix, the library is still big though. You have to pass the argument -DLLVM_TARGETS_TO_BUILD
to CMake and tell it the architectures you want to build. For example: -DLLVM_TARGETS_TO_BUILD=X86;ARM;Aarch64
Result:
$ du -h libkeystone.a
60M libkeystone.a
The available architectures are listed in the CMakeLists.txt
in the path llvm/lib/CMakeLists.txt
: https://github.com/keystone-engine/keystone/blob/master/llvm/CMakeLists.txt#L172-L180
In Capstone's CMakeLists.txt, there are some options there such as
CAPSTONE_ARCHITECTURE_DEFAULT
, which sets the default value (on/off) for all architectures, and it can be overridden with other options, such asCAPSTONE_X86_SUPPORT
. Is there such thing for this project? Turns out that the final binary for it gets huge:If there isn't a way to toggle some architectures off, will there be a way in the future?