I have a custom-built clang and libc++. I just tried to use address sanitizer and I get this error:
% /Dev/llvm-project/build_phase1/bin/clang++ [...]
-fsanitize=address
-L/Dev/llvm-project/build_sanitizers/compiler-rt/lib/darwin
-o my_program [...]
Error: ld: file not found: /Dev/llvm-project/build_phase1/lib/clang/17/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
That dylib file is not present where it says it looked, under build_phase1
. But it is present in the file I passed to -L
, under build_sanitizers
. Is there a way to tell it where to find the libclang_rt.asan_osx_dynamic.dylib
file?
(I’m on macOS)
~ Rob