Created attachment 304551 [details] emerge --info Minimal example to reproduce, and indeed there is no libclang_rt* anywhere on the system: (clang-r152216 and llvm-r152227) $ echo "int main(int argc, char* argv[]) { return 0; }" | clang -xc -faddress-sanitizer -fcatch-undefined-behavior - -o test -v clang version 3.1 (trunk) Target: x86_64-pc-linux-gnu Thread model: posix "/usr/bin/clang" -cc1 -triple x86_64-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name - -mrelocation-model static -mdisable-fp-elim -masm-verbose -mconstructor-aliases -munwind-tables -target-cpu x86-64 -momit-leaf-frame-pointer -v -resource-dir /usr/bin/../lib/clang/3.1 -fmodule-cache-path /var/tmp/clang-module-cache -internal-isystem /usr/local/include -internal-isystem /usr/bin/../lib/clang/3.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -fdebug-compilation-dir /home/pwaller -ferror-limit 19 -fmessage-length 177 -fcatch-undefined-behavior -faddress-sanitizer -mstackrealign -fgnu-runtime -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-fragile-abi -fdiagnostics-show-option -fcolor-diagnostics -o /tmp/--wS8twe.o -x c - clang -cc1 version 3.1 based upon LLVM 3.1svn default target x86_64-pc-linux-gnu ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/include" #include "..." search starts here: #include <...> search starts here: /usr/bin/../lib/clang/3.1/include /usr/include End of search list. "/usr/bin/x86_64-pc-linux-gnu-ld" --eh-frame-hdr -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 -o test /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../lib64/crt1.o /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../lib64/crti.o /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/crtbegin.o -L/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2 -L/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../x86_64-pc-linux-gnu/lib -L/usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../.. -L/lib -L/usr/lib /tmp/--wS8twe.o /usr/bin/../lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a -lpthread -ldl -export-dynamic -lgcc --as-needed -lgcc_s --no-as-needed -lc -lgcc --as-needed -lgcc_s --no-as-needed /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/crtend.o /usr/bin/../lib/gcc/x86_64-pc-linux-gnu/4.6.2/../../../../lib64/crtn.o /usr/bin/x86_64-pc-linux-gnu-ld: cannot find /usr/bin/../lib/clang/3.1/lib/linux/libclang_rt.asan-x86_64.a: No such file or directory clang: error: linker command failed with exit code 1 (use -v to see invocation)
Thanks for the report! asan support requires the compiler-rt subproject (found in upstream build instructions for clang SVN), I will update clang-9999 to also check out this module
clang-9999 now also fetches compiler-rt trunk (we will see when 3.1 release gets ready if compiler-rt can be split in a separate package) It also installs asan_symbolize.py, until this is added directly in compiler_rt
Fix confirmed. Thanks for the speedy fix!