Sanitizers are broken/missing in my build of 10.0.1

Hi there! I’ve just tried ASan/MSan in my Clang 10.0.1 installation built from the monorepo tarball this way:

export CC=/opt/gcc-9/bin/gcc
export CXX=/opt/gcc-9/bin/g++
export LDFLAGS=“-Wl,–rpath,/opt/gcc-9/lib64,-L/opt/gcc-9/lib64”


In that installation I am unable to use ASan/MSan as the corresponding libs are missing. Here is what I get when linking a small executable:

/usr/bin/ld: cannot find /opt/llvm-10/lib/clang/10.0.1/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory
/usr/bin/ld: cannot find /opt/llvm-10/lib/clang/10.0.1/lib/linux/libclang_rt.asan_cxx-x86_64.a: No such file or directory

The normal builds work well and executables do function.

What am I missing? Do I have to enable an additional project for these libs to get built/installed? (The environment is Ubuntu 16.04.2 x86-64, LLVM is built using GCC-9)

Thanks in advance,

The sanitizers are found in the compiler-rt project.

Confirmed, this brings working sanitizers:


I wish that was an automatic dependency brought by Clang.

Thank you very much!

It’s this way by design. It’s not a necessary dependency of clang and some targets don’t support it.