BinaryAnalysisPlatform / bap

Binary Analysis Platform
MIT License
2.07k stars 273 forks source link

selects specific llvm components for linking #1435

Closed ivg closed 2 years ago

ivg commented 2 years ago

Up until now, we were linking all available LLVM components that resulted in the bloated binary image and linking errors due to improperly packaged libraries on various distributions, e.g., missing Polly library, various problems with libterm, and so on, all these problems arose from components that we do not actually use. Moreover, the problem were never solved and issues remain open for decades.

The new approach is to link only the selected components. Since the list of available components is quite extensive (around 200) and there is no documentation available about their dependencies and intention, it is quite hard to identify the subset that we really need. The current default set works fine on llvm-14 but we can refine it later, once we will discover any problems. The components could be manually selected via the ./configure script with the --with-llvm-components option. For example --with-llvm-components=all will enable the old behavior.