https://github.com/KaOSx/main/blob/master/compiler-rt/PKGBUILD#L19
Install path is incorrect here, because it add executable/libraries in /usr/lib/clang/17.0.5 but the search path is just /usr/lib/clang/17

/usr/lib/clang/17/lib/linux/libclang_rt.asan_static-x86_64.a no such file or directory

It has to be

_clang_ver=17
pkgver=${_clang_ver}.0.5
-DCOMPILER_RT_INSTALL_PATH=/usr/lib/clang/${_clang_ver}