title: Compiling LLVM with assertions enabled and OCaml bindings
body: <p>I need to recompile LLVM 3.6 locally with assertions enabled to track down a bug in my compiler (segfault when building LLVM IR), but get some errors.</p>
  
  <p>1: Opam can't find LLVM lib:</p>
  
  <pre><code>$ sudo opam install llvm
  # /usr/bin/ld: cannot find -lLLVM-3.6
  </code></pre>
  
  <p>but</p>
  
  <pre><code>$ locate libllvm | grep ocaml
  /usr/local/lib/ocaml/libllvm-3.6.a
  /usr/local/lib/ocaml/libllvm.a
  ...
  </code></pre>
  
  <p>How do I tell opam to look in a specific directory for libllvm?</p>
  
  <p><strong>Edit</strong>: Solved using this configure when compiling LLVM:</p>
  
  <pre><code>configure --enable-targets=x86 --enable-bindings=ocaml 
    --enable-debug-runtime --enable-shared
  </code></pre>