libc++: perform configuration checks with -nodefaultlibs
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 29 Aug 2016 21:33:37 +0000 (21:33 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 29 Aug 2016 21:33:37 +0000 (21:33 +0000)
commit124186616a446128cfc78c0c048484401fa308e2
tree0fbf661757a9bd1b409c3fc28bfb0545406900af
parentdcbf2cbfcaea464c3bb5336e853007d7b7b3a4d2
libc++: perform configuration checks with -nodefaultlibs

We're compiling libc++ with -nodefaultlibs, so we should also pass this
option during the configuration checks to ensure those checks are
consistent with the actual build.

The primary motivation here is to ease cross-compilation against a
non-standard set of C++ libraries. Previously, the configuration checks
would attempt to link against the standard C++ libraries, which would
cause link failures when cross-compiling, even though the actual library
link would go through correctly (because of the use of -nodefaultlibs
and explicitly specifying any needed libraries). This is more correct
even ignoring the motivation, however.

Patch by Shoaib Meenai!

llvm-svn: 280015
libcxx/cmake/Modules/CheckLibcxxAtomic.cmake
libcxx/cmake/config-ix.cmake