Commit Graph

14 Commits

Author SHA1 Message Date
Evgeniy Stepanov 2abfe726b2 Replace cmake check for printf with a check for fopen.
Printf is a builtin, and the check fails with -Werror because of a clang
warning about an incompatible redeclaration.

llvm-svn: 255187
2015-12-10 00:45:18 +00:00
Eric Fiselier b17bb06914 [libcxx] Add new Sphinx documentation
Summary:
This patch adds Sphinx based documentation to libc++. The goal is to make it easier to write documentation for libc++ since writing new documentation in HTML is cumbersome. This patch rewrites the main page for libc++ along with the instructions for using, building and testing libc++. 

The built documentation can be found and reviewed here: http://efcs.ca/libcxx-docs

In order to build the sphinx documentation you need to specify the cmake options `-DLLVM_ENABLE_SPHINX=ON -DLIBCXX_INCLUDE_DOCS=ON`. This will add the makefile rule `docs-libcxx-html`.

Reviewers: chandlerc, mclow.lists, danalbert, jroelofs

Subscribers: silvas, cfe-commits

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

llvm-svn: 245788
2015-08-22 19:40:49 +00:00
Eric Fiselier 10ed6c361c Reapply working parts of CMake cleanup.
This patch adds the working parts of r243503. The difference with this patch
is that it doesn't include the HandleLLVMOptions.cmake file.

llvm-svn: 243698
2015-07-30 22:30:34 +00:00
Eric Fiselier b98aa4359a Revert recent CMake changes again due to failing compiler-rt builds
llvm-svn: 243593
2015-07-29 23:46:55 +00:00
Eric Fiselier ff16b9ac90 Recommit r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"
This change was reverted in r243550 because it broke clang-format builds
(see PR24306).

This patch recommits a fixed version of the original.

llvm-svn: 243574
2015-07-29 21:07:28 +00:00
Hans Wennborg 1e33bbecb9 Revert r243503 "[libcxx] Cleanup CMake configuration and integrate with LLVM"
This caused clang-format to stop linking on Mac; see PR24306.

llvm-svn: 243550
2015-07-29 18:32:21 +00:00
Eric Fiselier 7eb30deff1 [libcxx] Cleanup CMake configuration and integrate with LLVM
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`.

  

Reviewers: mclow.lists, jroelofs, danalbert

Subscribers: cfe-commits

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

llvm-svn: 243503
2015-07-29 00:03:51 +00:00
Eric Fiselier 71380b8391 Add -gline-tables-only when compiling w/ sanitizers in RELEASE
llvm-svn: 222035
2014-11-14 20:38:07 +00:00
Eric Fiselier 0058c80cc7 [libcxx] Add support for LLVM_USE_SANITIZER to libcxx when being built standalone and in-tree
Summary:
This patch adds support for LLVM_USE_SANITIZER when being built in-tree and standalone. 

This patch does the following things:
1. define the LLVM_USE_SANITIZER option to "" when being built standalone. This also helps show we support it.
2. Translate LLVM_USE_SANITIZER when standalone in a very similar way done in llvm/cmake/HandleLLVMOptions.cmake.
3. Add config.llvm_use_sanitizer to lit.site.cfg.in
4. Add code to translate config.llvm_use_sanitizer's value into the needed compile flags in lit.cfg.

Currently lit.cfg assumes that that the compiler supports '-fno-omit-frame-pointer' while CMakeLists.txt actually checks to see if its supported. We could pass this information to lit but I'm not sure its needed. 

Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: cfe-commits

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

llvm-svn: 215872
2014-08-18 05:03:46 +00:00
Eric Fiselier 1b44db22c6 [libcxx] Update the way the -std= flag is chosen by CMake and LibcxxTestFormat
Summary:
This patch does two things:
CMake Update:
  - Add compiler flag checks for -std=c++11 and -std=c++1y and remove check for -std=c++0x.
  - Add configuration option LIBCXX_ENABLE_CXX1Y to prevent/allow -std=c++1y from being chosen as the std version. LIBCXX_ENABLE_CXX1Y is set to OFF by default.
  - if LIBCXX_ENABLE_CXX1Y is enabled then set LIBCXX_STD_VERSION to c++1y and fail if the compiler does not support -std=c++1y
  - If c++1y is not enabled then use c++11 and fail if the compiler does not support c++11.

Lit Update:
  - Update lit.site.cfg.in to capture LIBCXX_STD_VERSION information as config.std.
  - Remove mentions of has_cxx0X configuration option.
  - Check for `--param std=X' passed to lit on the command line.
  - Choose the std for the tests either from command line parameter or (if it doesn't exist) the lit.site.cfg.



Reviewers: mclow.lists, danalbert

Reviewed By: danalbert

Subscribers: emaste, rnk, ajwong, danalbert, cfe-commits

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

llvm-svn: 215802
2014-08-16 01:35:36 +00:00
Saleem Abdulrasool 407964238f build: remove unnecessary modification of CMAKE_REQUIRED_DEFINITIONS
This is unnecessary now that the flag handling has been fixed.  The flags will
be added properly in the main CMakeLists.txt after the config-ix inclusion which
performs the required check.

llvm-svn: 203639
2014-03-12 04:11:34 +00:00
Alexey Samsonov eb38496950 Explicitly specify -Wno-error if LIBCXX_ENABLE_WERROR is false.
libcxx doesn't build with -Werror because of #warnings in its source
code. But when libcxx is built as an external LLVM project, it inherits
LLVM build flags, breaking the build if LLVM_ENABLE_WERROR is enabled.

llvm-svn: 191814
2013-10-02 07:44:19 +00:00
Howard Hinnant cf76200bd3 http://llvm.org/bugs/show_bug.cgi?id=9399 fixed by Ryuta Suzuki
llvm-svn: 131961
2011-05-24 12:54:00 +00:00
Michael J. Spencer f5799be4a8 Add CMake build and fix major Linux blockers.
llvm-svn: 121510
2010-12-10 19:47:54 +00:00