<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - libclang_rt.asan_osx_dynamic.dylib incorrect RPATH"
   href="http://llvm.org/bugs/show_bug.cgi?id=21618">21618</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>libclang_rt.asan_osx_dynamic.dylib incorrect RPATH
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ruslan_baratov@yahoo.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>*asan*.dylib has an incorrect rpath:

<span class="quote">> otool -L lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib</span >
   
/private/tmp/llvm-release/final/Phase3/Release/llvmCore-3.5.0-final.obj/Release/lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
(compatibility version 0.0.0, current version 0.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version
120.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version
1197.1.1)

It's probably some temporary build location which not exists.

This lead to error:
<span class="quote">> cat main.cpp</span >
#include <iostream>
int main() {
  std::cout << "hello" << std::endl;
}
<span class="quote">> clang++ -fsanitize=address main.cpp -o foo && ./foo</span >
dyld: Library not loaded:
/private/tmp/llvm-release/final/Phase3/Release/llvmCore-3.5.0-final.obj/Release/lib/clang/3.5.0/lib/darwin/libclang_rt.asan_osx_dynamic.dylib
  Referenced from: /.../foo
  Reason: image not found
Trace/BPT trap: 5

Simple workaround:
<span class="quote">> install_name_tool /path/to/real/*.dylib -id /path/to/real/*.dylib</span ></pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>