<div dir="ltr">libcxx is needed to run compiler-rt tests, but it shouldn't be needed to run clang's tests. And to _use_ your self-built compiler, you need to add `-isysroot $(xcrun -show-sdk-path)` to the compile flags to let the compiler find C headers anyway, which also makes it find the libc++ headers.<div><br></div><div>For compiler-rt's test runner, maybe it could check if the compiler does find headers with `-isysroot $(xcrun -show-sdk-path)` added on OS X and then just add that itself if it's needed and it helps.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 4, 2015 at 2:07 PM, Yuri Gribov via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Oh, nice so this was actually done by Kuba to fix sanitizer unittests:<div><div><br></div><div>      "echo '#include <iostream>' | ${COMPILER_RT_TEST_COMPILER} -E -x c++ - > /dev/null"</div><div>      "if [ $? != 0 ] "</div><div>      "  then echo"</div><div>      "  echo 'Your just-built clang cannot find C++ headers, which are needed to build and run compiler-rt tests.'"</div><div>      "  echo 'You should copy or symlink your system C++ headers into ${LLVM_BINARY_DIR}/include/c++'"</div><div>      "  if [ -d $(dirname $(dirname $(xcrun -f clang)))/include/c++ ]"</div><div>      "    then echo 'e.g. with:'"</div><div>      "    echo '  cp -r' $(dirname $(dirname $(xcrun -f clang)))/include/c++ '${LLVM_BINARY_DIR}/include/'"</div><div>      "  elif [ -d $(dirname $(dirname $(xcrun -f clang)))/lib/c++ ]"</div><div>      "    then echo 'e.g. with:'"</div><div>      "    echo '  cp -r' $(dirname $(dirname $(xcrun -f clang)))/lib/c++ '${LLVM_BINARY_DIR}/include/'"</div><div>      "  fi"</div><div>      "  echo 'This can also be fixed by checking out the libcxx project from <a href="http://llvm.org" target="_blank">llvm.org</a> and installing the headers'"</div><div>      "  echo 'into your build directory:'"</div><div>      "  echo '  cd ${LLVM_SOURCE_DIR}/projects && svn co <a href="http://llvm.org/svn/llvm-project/libcxx/trunk" target="_blank">http://llvm.org/svn/llvm-project/libcxx/trunk</a> libcxx'"</div><div>      "  echo '  cd ${LLVM_BINARY_DIR} && make -C ${LLVM_SOURCE_DIR}/projects/libcxx installheaders HEADER_DIR=${LLVM_BINARY_DIR}/include'"</div><div>      "  echo"</div><div>      "  false"</div><div>      "fi"</div></div><div><br></div><div class="gmail_extra"><div class="gmail_quote"><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">What I mean is that we should either fix the tests, or describe precisely the scenario in which libcxx+libcxxabi is needed.... because it's not always needed. I suspect it's just needed when testing the sanitizers (but I might be wrong).<br></blockquote><div><br></div></span><div>What if I s/mandatory on OS X, optional otherwise/required to run tests on OS X/ ?</div><div><br></div><div>-Y</div></div></div></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>