<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 --- - Clang bootstrap should work with LLVM_ENABLE_LIBCXX"
   href="http://llvm.org/bugs/show_bug.cgi?id=18569">18569</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Clang bootstrap should work with LLVM_ENABLE_LIBCXX
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>-New Bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>samsonov@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>chandlerc@gmail.com, eugeni.stepanov@gmail.com, hhinnant@apple.com, kcc@google.com, llvmbugs@cs.uiuc.edu, mclow.lists@gmail.com
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Currently, the following process doesn't work:
(1) Build LLVM/Clang/libc++ using a host compiler (e.g. some version of gcc).
(2) Build Clang again with just-built Clang and -DLLVM_ENABLE_LIBCXX=ON.

I see a number of problems:
(1) Clang doesn't find libc++ if it's not installed in the system, but is
instead located in Clang build directory (or is a part of Clang installation).
See Chandler's comments in r199632 thread. tl;dr libc++ was always thought to
be a part of OS or system root, but not a part of compiler distribution. But we
still want to locate it somehow if it's built together with the compiler.

(2) Configuration problem.
$ cat cxxabi_test.cc 
#include <cxxabi.h>
$ clang++ cxxabi_test.cc -c -o a.o
$ clang++ cxxabi_test.cc -c -o a.o -stdlib=libc++
cxxabi_test.cc:1:10: fatal error: 'cxxabi.h' file not found

As a result at configuration time we find cxxabi.h header, but we can't locate
it when we actually compile the project sources with -stdlib=libc++</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>