This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Allow target flags to affect CMake configuration tests
ClosedPublic

Authored by EricWF on Jun 1 2016, 4:20 PM.

Details

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

Diff Detail

Event Timeline

EricWF updated this revision to Diff 59301.Jun 1 2016, 4:20 PM
EricWF retitled this revision from to [libcxx] Allow target flags to affect CMake configuration tests.
EricWF updated this object.
EricWF added reviewers: danalbert, jroelofs, bcraig, compnerd.
EricWF added a subscriber: cfe-commits.
compnerd accepted this revision.Jun 1 2016, 5:49 PM
compnerd edited edge metadata.
This revision is now accepted and ready to land.Jun 1 2016, 5:49 PM
compnerd requested changes to this revision.Jun 1 2016, 5:52 PM
compnerd edited edge metadata.
compnerd added inline comments.
CMakeLists.txt
259

This is missing the `='. As much as I like the separate arguments, it does cause a difference here :-(. It should be "--sysroot=${LIBCXX_SYSROOT}".

This revision now requires changes to proceed.Jun 1 2016, 5:52 PM
EricWF updated this revision to Diff 59325.Jun 1 2016, 6:05 PM
EricWF edited edge metadata.

Address review comments. Add "=" sign in sysroot.

compnerd accepted this revision.Jun 1 2016, 6:06 PM
compnerd edited edge metadata.
This revision is now accepted and ready to land.Jun 1 2016, 6:06 PM
EricWF closed this revision.Jun 1 2016, 6:16 PM