Skip to content

[FR] remove superfluous LLVM libraries #2010

@ur4t

Description

@ur4t

Description

I am curious about how LLVM toolchain distributed with NDK are built and find some potential improvements in current versions (r26.2/r487747e and r28/r522817):

  1. Plugin support in Clang was disabled to reduce binary size, but...
  2. libclang.so, libclang-cpp.so and libLLVM-17.so are built, beacuse LLVM_BUILD_LLVM_DYLIB is ON since the build scripts are refactored, and...
  3. Those shared libraries are not linked to any binaries because LLVM_LINK_LLVM_DYLIB is not set (OFF by default since introduced by llvm/llvm-project@9211396).
  4. Currently the build scripts perform BOLT themselves, while upstream CMake has added BOLT support (llvm/llvm-project@3dab7fe and llvm/llvm-project@076240f).

By the way, I find LLVM_ENABLE_THREADS is explicitly defined as ON, which is default on most platforms supported by LLVM.

Those are not bugs because functionalities are not broken, so this issue is labeled with "enhancement". As for "plugin support in Clang", it would be nice to compile and load out-of-tree passes independently rather than compile the whole modified LLVM toolchain.

Metadata

Metadata

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions