[CMake] Add -stdlib=libc++ to host Clang build flags before performing any header...
authorAlexey Samsonov <samsonov@google.com>
Tue, 4 Feb 2014 07:55:18 +0000 (07:55 +0000)
committerAlexey Samsonov <samsonov@google.com>
Tue, 4 Feb 2014 07:55:18 +0000 (07:55 +0000)
commitcaeb7f94c75dbc8fcf30607f72546c8f097d1b42
treee481730cab3ee594d3b581f34b1d763e16efa469
parentde2e0bc3668ac0e2e64bbef329766fa8119c3204
[CMake] Add -stdlib=libc++ to host Clang build flags before performing any header search

If LLVM_ENABLE_LIBCXX is specified, we should append -stdlib=libc++ to build
flags as early as possible, in particular, before we check for header presence
(as -stdlib=libc++ modifies header lookup rules). Otherwise we can find a header
at configure time (w/o -stdlib=libc++) but fail to find it at build time
(with -stdlib=libc++). See PR18569 for more details.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200744 91177308-0d34-0410-b5e6-96231b3b80d8
CMakeLists.txt
cmake/config-ix.cmake
cmake/modules/HandleLLVMOptions.cmake