[PATCH] D23719: [libc++] Use C11 for atomics check

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 19 15:34:41 PDT 2016


rsmith added a comment.

In https://reviews.llvm.org/D23719#521233, @smeenai wrote:

> I'm thinking the best way to accomplish this is to globally add `-nodefaultlib` to `CMAKE_REQUIRED_FLAGS`, and then globally set `CMAKE_REQUIRED_LIBRARIES` to the required set of libraries, similar to what the library build is doing. Does that make sense?


I'm not sure that will test the right thing, but if it works then it seems reasonable. My concern is that -nodefaultlib may suppress the addition of -latomic to the link line, and if so, the configure-time check would always fail, even though an actual link using libc++'s <atomic> would work. Is there a -nodefaultlib analogue of -nostdinc++ to turn off just the C++ standard library portion of the link?


https://reviews.llvm.org/D23719





More information about the cfe-commits mailing list