<div dir="auto"><div>It's this way by design. It's not a necessary dependency of clang and some targets don't support it.<br><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 15, 2020, 5:18 PM Oleg Smolsky <<a href="mailto:osmolsky@netskope.com">osmolsky@netskope.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Confirmed, this brings working sanitizers:<div><br><div>     -DLLVM_ENABLE_PROJECTS="clang;compiler-rt" </div><div><br></div><div>I wish that was an automatic dependency brought by Clang.</div><div><br></div><div>Thank you very much!</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Aug 15, 2020 at 1:30 PM Brian Cain <<a href="mailto:brian.cain@gmail.com" target="_blank" rel="noreferrer">brian.cain@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><div>The sanitizers are found in the compiler-rt project.</div><div dir="auto"><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, Aug 15, 2020, 1:17 PM Oleg Smolsky via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  

    
  
  <div>
    <p><font face="Calibri">Hi there! I've just tried ASan/MSan in my
        Clang 10.0.1 installation built from the monorepo tarball this
        way:</font></p>
    <p><font face="Calibri">export CC=/opt/gcc-9/bin/gcc<br>
        export CXX=/opt/gcc-9/bin/g++<br>
        export LDFLAGS="-Wl,--rpath,/opt/gcc-9/lib64,-L/opt/gcc-9/lib64"<br>
      </font></p>
    <p><font face="Calibri">cmake \<br>
            -DLLVM_ENABLE_PROJECTS="clang" \<br>
            -DCMAKE_BUILD_TYPE=Release \<br>
            -DCMAKE_INSTALL_PREFIX:PATH=$destination \<br>
            ../llvm<br>
        make</font></p>
    <p><font face="Calibri"><a href="https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz" rel="noreferrer noreferrer" target="_blank">https://github.com/llvm/llvm-project/releases/download/llvmorg-10.0.1/llvm-project-10.0.1.tar.xz</a><br>
      </font></p>
    <p>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:</p>
    <p>/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<br>
      /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</p>
    <p>The normal builds work well and executables do function.<br>
    </p>
    <p>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)<br>
    </p>
    <p>Thanks in advance,<br>
      Oleg.<br>
    </p>
  </div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" rel="noreferrer noreferrer" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div></div>
</blockquote></div>
</blockquote></div></div></div>