title: Clang linker does not look into LD_LIBRARY_PATH
body: <p>I am trying to build and link a C++, cmake-based project with clang (3.0). This project links to several libraries that are installed in a custom directory /my/dir/. This directory is included in the LD_LIBRARY_PATH and LIBRARY_PATH environment variables. Project builds and links fine with g++. </p>
  
  <p>The link command generated and executed by cmake looks like the following: </p>
  
  <pre><code>/usr/bin/clang++ -O3 stuff.cpp.o -o stuff -rdynamic -lmylib
  </code></pre>
  
  <p>ld then complains with the following message:</p>
  
  <pre><code>/usr/bin/ld: cannot find -lmylib
  </code></pre>
  
  <p>The link command above runs fine whenever I manually add <code>-L/my/dir/</code>. Is there a way to link without specifying the <code>-L</code> flag?</p>