[PATCH] D66800: Some notes in `LLVM_ENABLE_LIBCXX`

Yichen Yan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 06:41:20 PDT 2019


oraluben created this revision.
oraluben added projects: libc++, LLVM.
Herald added subscribers: llvm-commits, mgorny.

Reference: https://bugs.llvm.org/show_bug.cgi?id=43105

I've found a bug when libc++ is the only STL on system and cmake will fail building llvm.
It looks like this is not a serious issue so no one is working on that. But I think it's better to mention it in doc.

This is not a fix but just a document enhancement.


Repository:
  rL LLVM

https://reviews.llvm.org/D66800

Files:
  llvm/docs/CMake.rst


Index: llvm/docs/CMake.rst
===================================================================
--- llvm/docs/CMake.rst
+++ llvm/docs/CMake.rst
@@ -431,6 +431,8 @@
   passed to invocations of both so that the project is built using libc++
   instead of stdlibc++. Defaults to OFF.
 
+  .. note:: LLVM_ENABLE_LIBCXX will not affect cmake checking CXX compiler, so it will fail when `libc++` is the only STL on system. In that case `-DCMAKE_CXX_FLAGS='-stdlib=libc++'` should be used.
+
 **LLVM_STATIC_LINK_CXX_STDLIB**:BOOL
   Statically link to the C++ standard library if possible. This uses the flag
   "-static-libstdc++", but a Clang host compiler will statically link to libc++


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66800.217389.patch
Type: text/x-patch
Size: 682 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190827/32a61ec1/attachment.bin>


More information about the llvm-commits mailing list