- Necessary to fix this error that otherwise would occur when attempting
to launch the software `qt-creator`:
```
qtc.extensionsystem.plugin: [ ClangFormat ] Plugin error:
/data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so:
Cannot load library /data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so:
dlopen failed: cannot locate symbol "_ZTIN4llvm3vfs10FileSystemE"
referenced by "/data/data/com.termux/files/usr/lib/qtcreator/plugins/libClangFormat.so"...
```
- All other major UNIX-like operating systems enable this. See https://github.com/termux/termux-packages/pull/27309#issuecomment-3546559301
- Makes the default behavior of on-device building with the address sanitizer match the default behavior of building with the address sanitizer on Clang for Desktop Linux distros, which is to use the static library
- Fixes https://github.com/termux/termux-packages/issues/26485
- On devices that do not have `libclang_rt.asan-$arch-android.so` or which have a corrupted one, fixes building on-device with `-fsanitize=address`
- Samsung Galaxy S III SPH-L710 with LineageOS 14.1 Android 7.1.2 before:
```
~ $ clang test.c -fsanitize=address
~ $ ./a.out
WARNING: linker: /data/data/com.termux/files/home/a.out: unsupported flags DT_FLAGS_1=0x8000001
CANNOT LINK EXECUTABLE "./a.out": library "libclang_rt.asan-arm-android.so" not found
Aborted ./a.out
~ $ clang test.c -fsanitize=address -Wl,-rpath=$PREFIX/lib/clang/20/lib/linux
~ $ ./a.out
WARNING: linker: /data/data/com.termux/files/home/a.out: unsupported flags DT_FLAGS_1=0x8000001
~ $ termux-elf-cleaner ./a.out
termux-elf-cleaner: Replacing unsupported DF_1_* flags 134217729 with 1 in './a.out'
~ $ ./a.out
~ $ file /system/lib/libclang_rt.asan-arm-android.so
/system/lib/libclang_rt.asan-arm-android.so: cannot open `/system/lib/libclang_rt.asan-arm-android.so' (No such file or directory)
~ $
```
- After:
```
~ $ clang test.c -fsanitize=address
~ $ ./a.out
WARNING: linker: /data/data/com.termux/files/home/a.out: unsupported flags DT_FLAGS_1=0x8000001
~ $ termux-elf-cleaner a.out
termux-elf-cleaner: Replacing unsupported DF_1_* flags 134217729 with 1 in 'a.out'
~ $ ./a.out
~ $
```
- Vivo iQOO Neo8 V2301A with Android 15 before:
```
thread #1, name = 'a.out', stop reason = signal SIGILL: illegal opcode
```
- After: believed to work
again
lldb seems to work for i686 on termux-docker atleast, I assume the
underlying issue has been fixed now. Let's try to package this again. If
we receive any complaints, we can go ahead and investigate
- Fixes termux#25622, which is an error that began occurring after the update to NDK r28c
- Also makes Termux's `clang` package behave more similarly to how Termux's `TERMUX_ON_DEVICE_BUILD=false` cross-compiling toolchain behaves