Commit Graph

9 Commits

Author SHA1 Message Date
termux-pacman-bot
9b1d8bc03e fix(main/clang): default to using the static library of the address sanitizer instead of the shared library
- 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
2025-10-13 15:06:11 +00:00
termux-pacman-bot
8e46f9135d enhance(libllvm): add a flag to clang so the Termux rpaths are not automatically added 2023-07-18 18:01:20 +00:00
termux-pacman-bot
d92ec7f8b7 bump(libllvm): 16.0.0 to 16.0.1
Also, add the rpath for ndk-multilib when cross-compiling.
2023-04-06 10:01:32 +00:00
termux-pacman-bot
06c5ece9be upgpkg(libllvm): 14.0.6 to 15.0.0 2022-09-19 07:31:05 +00:00
termux-actions[bot]
243c0de610 packages/libllvm 2022-05-30 08:29:49 +00:00
termux-actions[bot]
f2bf79a2a2 packages/libllvm 2022-04-13 06:47:34 +00:00
Maxython
7990208077 Update package libllvm 2021-11-09 10:12:33 +03:00
Butta
f063fe399f libllvm: update from 12.0.1 to 13.0.0 2021-10-23 23:27:34 +05:30
Butta
206246fc9d libllvm: update from 10.0.1 to 11.0.0 and merge lldb 2020-12-24 12:09:16 +05:30