[PATCH][www] Mention that libcxx is necessary on OS X
Nico Weber via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 7 08:21:02 PDT 2015
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.
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.
On Fri, Sep 4, 2015 at 2:07 PM, Yuri Gribov via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Oh, nice so this was actually done by Kuba to fix sanitizer unittests:
>
> "echo '#include <iostream>' | ${COMPILER_RT_TEST_COMPILER} -E -x c++
> - > /dev/null"
> "if [ $? != 0 ] "
> " then echo"
> " echo 'Your just-built clang cannot find C++ headers, which are
> needed to build and run compiler-rt tests.'"
> " echo 'You should copy or symlink your system C++ headers into
> ${LLVM_BINARY_DIR}/include/c++'"
> " if [ -d $(dirname $(dirname $(xcrun -f clang)))/include/c++ ]"
> " then echo 'e.g. with:'"
> " echo ' cp -r' $(dirname $(dirname $(xcrun -f
> clang)))/include/c++ '${LLVM_BINARY_DIR}/include/'"
> " elif [ -d $(dirname $(dirname $(xcrun -f clang)))/lib/c++ ]"
> " then echo 'e.g. with:'"
> " echo ' cp -r' $(dirname $(dirname $(xcrun -f clang)))/lib/c++
> '${LLVM_BINARY_DIR}/include/'"
> " fi"
> " echo 'This can also be fixed by checking out the libcxx project
> from llvm.org and installing the headers'"
> " echo 'into your build directory:'"
> " echo ' cd ${LLVM_SOURCE_DIR}/projects && svn co
> http://llvm.org/svn/llvm-project/libcxx/trunk libcxx'"
> " echo ' cd ${LLVM_BINARY_DIR} && make -C
> ${LLVM_SOURCE_DIR}/projects/libcxx installheaders
> HEADER_DIR=${LLVM_BINARY_DIR}/include'"
> " echo"
> " false"
> "fi"
>
> 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).
>>
>
> What if I s/mandatory on OS X, optional otherwise/required to run tests on
> OS X/ ?
>
> -Y
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150907/2d52f3f4/attachment.html>
More information about the cfe-commits
mailing list