1#include <sys/auxv.h>
2
3static void CONSTRUCTOR_ATTRIBUTE init_have_lse_atomics(void) {
4 unsigned long hwcap = getauxval(AT_HWCAP);
5 __aarch64_have_lse_atomics = (hwcap & HWCAP_ATOMICS) != 0;
6}
7

source code of compiler-rt/lib/builtins/cpu_model/aarch64/lse_atomics/sysauxv.inc