This Magisk module contains clang21 and the files from the Android NDK r29 necessary to compile libraries and binaries for arm64 CPUs.

ASUS_I006D:/data/local/tmp $ clang --version
clang version 21.0.0git (https://android.googlesource.com/toolchain/llvm-project 37f38d1f3276b62fba09462ab4807dce846c732d)
Target: aarch64-unknown-linux-android
Thread model: posix
InstalledDir: /system/usr/clang21/bin
ASUS_I006D:/data/local/tmp $ 


The Module also contains some additional utilities in the directory /system/usr/clang21/utils/bin:

make 4,4.1
pkg-config 0.29
pkgconf 2.30

gnupatch 2.8
gdb 16.3
nano 8.6
the GNU binutils version 2.44 (addr2line  ar  as  c++filt  elfedit  gprof  ld  ld.bfd  nm  objcopy  objdump  ranlib  readelf  size  strings  strip)

A Magisk Module with cmake and ninja is available here: http://bnsmb.de/files/public/Magisk_Modules.html#magisk_module_with_cmake_and_ninja


The clang21 files are in the directory 

/system/usr/clang21


The binaries for clang21 are in the directory

/system/usr/clang21/bin


The binaries for make, pkg-config, pkgconf and the other utilities are in the directory

/system/usr/clang21/utils/bin




The files from the Android NDK are in the directory

/system/usr/ndk/r29

The sysroot from the Android NDK is in the directory

/system/usr/ndk/r29/toolchains/llvm/prebuilt/aarch64/sysroot/


Use 

source /system/bin/init_clang21_env

to init the environment for the clang21. This script defines all necessary environment variables (including the PATH variable) to use the clang.


To use pkgconf instead of pkg-config set the variable PKG_CONFIG:

export PKG_CONFIG=/system/usr/clang21/utils/bin/pkgconf


Source Code used to create the binaries
---------------------------------------

The repo with the source code for the clang is:

https://android.googlesource.com/toolchain/llvm-project

The source code was checked out in 10/2025


The Android NDKs are available here:

https://developer.android.com/ndk/downloads


see 

http://bnsmb.de/Magisk_Modules.html#Documentation_for_the_Magisk_Module_with_clang21_and_the_NDK_r29

for the documentation for this Magisk Module


History

18.10.2025 v1.0.0

