This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Cleanup CMake configuration and integrate with LLVM
ClosedPublic

Authored by EricWF on Jul 17 2015, 1:06 PM.

Details

Summary

This patch contains the following changes:

  1. Require that libc++ can find a LLVM source directory. This is done the same way as libc++abi currently does.
  2. Cleanup ugly configuration code in CMakeLists.txt by using add_flags, add_flags_if, and add_flags_if_supported macros.

The goals for this patch are:

  1. Help libc++ be more consistent with how LLVM handles CMake options (see PR23670 PR23671).
  2. Make it easier to use sanitizers using the LLVM_USE_SANITIZER option.
  3. Make libc++'s CMakeLists.txt file easier to understand and change.
  4. Move towards allowing libc++ to create Sphinx documentation (see http://efcs.ca/libcxx-docs).
  5. Move towards allowing libc++ to use other LLVM utilities such as not and FileCheck.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 30022.Jul 17 2015, 1:06 PM
EricWF retitled this revision from to [libcxx] Cleanup CMake configuration and integrate with LLVM.
EricWF updated this object.
EricWF added reviewers: mclow.lists, danalbert, jroelofs.
EricWF added a subscriber: cfe-commits.
EricWF updated this revision to Diff 30025.Jul 17 2015, 1:11 PM

Add comments in HandleLibcxxFlags.cmake.

EricWF updated this revision to Diff 30203.Jul 20 2015, 3:38 PM

Update so that the patch applies cleanly to master.

danalbert added inline comments.Jul 28 2015, 10:47 AM
CMakeLists.txt
64

Nit: the other descriptions end with a period

105

This sentence doesn't make sense. "Set foo to bar is on..." ?

EricWF updated this revision to Diff 30841.Jul 28 2015, 12:14 PM
EricWF marked 2 inline comments as done.

Address @danalbert's comments.

danalbert accepted this revision.Jul 28 2015, 1:09 PM
danalbert edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Jul 28 2015, 1:09 PM
EricWF closed this revision.Jul 28 2015, 5:04 PM