phosek added inline comments.

================
Comment at: compiler-rt/CMakeLists.txt:534
+if (COMPILER_RT_CXX_LIBRARY STREQUAL "libcxx")
+  # We are using the in-tree libc++ so avoid including the default one.
+  append_list_if(COMPILER_RT_HAS_NOSTDINCXX_FLAG -nostdinc++ 
COMPILER_RT_COMMON_CFLAGS)
----------------
mstorsjo wrote:
> Does this mean that if you set `COMPILER_RT_CXX_LIBRARY=libcxx`, it's assumed 
> that you're actually _building_ that same libcxx in the same cmake invocation?
> 
> I'm currently building compiler-rt in a standalone cmake invocation, separate 
> from all the others, with `-DSANITIZER_CXX_ABI=libc++`. Building them all at 
> once might be something I could consider at some point, but I wouldn't want 
> to force that situation right now, if it could be avoided?
Yes, correct. This is modeled after 
https://github.com/llvm/llvm-project/blob/610139d2d9ce6746b3c617fb3e2f7886272d26ff/libcxx/CMakeLists.txt#L230
 and 
https://github.com/llvm/llvm-project/blob/610139d2d9ce6746b3c617fb3e2f7886272d26ff/libcxx/cmake/Modules/HandleLibCXXABI.cmake#L109.

In your case you'd likely want to use `-DCOMPILER_RT_CXX_LIBRARY=system-libcxx`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D128036/new/

https://reviews.llvm.org/D128036

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to