[libcxx] Allow target flags to affect CMake configuration tests

Summary:
This patch changes the libc++ CMake so that it adds certain target flags like '-m32' or '--gcc-toolchain' before including config-ix.cmake.
Since these flags can affect things like check_library_exists([...]) they needed to be added before the tests are performed.

This patch fixes:

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

Reviewers: danalbert, jroelofs, bcraig, compnerd

Subscribers: cfe-commits

Differential Revision: http://reviews.llvm.org/D20887

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@271460 91177308-0d34-0410-b5e6-96231b3b80d8
2 files changed