From c7686797fc0ed65a56e025773b313641f2bf709b Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Fri, 1 Nov 2024 13:32:07 +0000 Subject: [PATCH] scripts/sanitizer-env.sh: support new clang 19 DSO Seemingly with version 19, the CPU arch was dropped from the DSO name. Try that and fallback to the old one, as applicable. Signed-off-by: Emil Velikov Link: https://github.com/kmod-project/kmod/pull/219 Signed-off-by: Lucas De Marchi --- scripts/sanitizer-env.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/sanitizer-env.sh b/scripts/sanitizer-env.sh index f5a42cf4..2fbebc55 100755 --- a/scripts/sanitizer-env.sh +++ b/scripts/sanitizer-env.sh @@ -5,7 +5,11 @@ if [[ ${CC-} == *gcc* ]]; then OUR_PRELOAD=$("$CC" -print-file-name=libasan.so) elif [[ ${CC-} == *clang* ]]; then - OUR_PRELOAD=$("$CC" -print-file-name=libclang_rt.asan-x86_64.so) + # With v19, the library lacks the CPU arch in its name + OUR_PRELOAD=$("$CC" -print-file-name=libclang_rt.asan.so) + if ! test -f "$OUR_PRELOAD"; then + OUR_PRELOAD=$("$CC" -print-file-name=libclang_rt.asan-x86_64.so) + fi else cat <<- EOF >&2 -- 2.47.3