This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Refactor CMakeLists.txt handling of compile and link flags to suppress warnings.
ClosedPublic

Authored by EricWF on Nov 14 2014, 12:53 PM.

Details

Summary

Currently we have 5 variables that are used to specify options for building libcxx

  1. LIBCXX_CXX_FEATURE_FLAGS
  2. LIBCXX_CXX_WARNING_FLAGS
  3. LIBCXX_CXX_REQUIRED_FLAGS
  4. compile_flags (in libcxx/lib)
  5. link_flags (in libcxx/lib)

The first three all get put into CMAKE_CXX_FLAGS.
This changes the way flags are handled by only using 3 different options:

  1. LIBCXX_CXX_FLAGS - general compile and link flags.
  2. LIBCXX_COMPILE_FLAGS - compile only flags.
  3. LIBCXX_LINK_FLAGS - link only flags.

This patch also removes the warning about -nostdinc++ being unused during linking.

Diff Detail

Event Timeline

EricWF updated this revision to Diff 16241.Nov 14 2014, 12:53 PM
EricWF retitled this revision from to [libcxx] Refactor CMakeLists.txt handling of compile and link flags to suppress warnings. .
EricWF updated this object.
EricWF edited the test plan for this revision. (Show Details)
EricWF added reviewers: danalbert, mclow.lists.
EricWF added a subscriber: Unknown Object (MLST).
danalbert accepted this revision.Nov 14 2014, 9:50 PM
danalbert edited edge metadata.

LGTM. Thanks!

This revision is now accepted and ready to land.Nov 14 2014, 9:50 PM
EricWF closed this revision.Nov 14 2014, 10:26 PM