Commit Graph

19 Commits

Author SHA1 Message Date
Shoaib Meenai 8e62812ed3 [libc++] Add site config option for ABI macros
Some ABI macros affect headers, so it's nice to have a site config
option for them. Add a LIBCXX_ABI_DEFINES cmake macro to allow
specifying a list of ABI macros to define in the site config.

The primary design constraint (as discussed with Eric on IRC a while
back) was to not have to repeat the ABI macro names in cmake, which only
leaves a free-form cmake list as an option. A somewhat unfortunate
consequence is that we can't verify that the ABI macros being defined
actually exist, though we can at least perform some basic sanity
checking, since all the ABI macros begin with _LIBCPP_ABI_.

Differential Revision: https://reviews.llvm.org/D36719

llvm-svn: 314946
2017-10-04 23:17:12 +00:00
Petr Hosek 510e70fdd5 [libcxx][CMake] Add install path variable to allow overriding the destination
This is going to be used by the runtime build in the multi-target
setup to allow using different install prefix for each target.

Differential Revision: https://reviews.llvm.org/D33762

llvm-svn: 307615
2017-07-11 02:39:50 +00:00
Saleem Abdulrasool fb9ae0e3fe docs: add some documentation for building on Windows
This covers how to build libc++ for Windows.  This allows others to
replicate the MS ABI style build for libc++.  It only depends on msvcrt
as it uses the Windows threading model and the Windows ABI and can serve
as an ABI compatible replacement for msvcprt.

llvm-svn: 294705
2017-02-10 03:58:20 +00:00
Eric Fiselier 3aa5478e21 Add start of filesystem benchmarks
llvm-svn: 285524
2016-10-30 22:53:00 +00:00
Eric Fiselier 8e68d6a023 Attempt to fix Sphinx build
llvm-svn: 281697
2016-09-16 03:47:53 +00:00
Eric Fiselier 309a50aefb Enable installation of libc++experimental by default.
When libc++experimental was originally created it was empty and therefore there
was no reason to install it. Now that the library contains
<experimental/memory_resource> and <experimental/filesystem> there is a good
reason to install it.

Specifically this patch enables the installation whenever LIBCXX_INSTALL_LIBRARY
is true and LIBCPP_ENABLE_EXPERIMENTAL_LIBRARY is true.

llvm-svn: 280773
2016-09-07 01:15:10 +00:00
Eric Fiselier 8b4a30584a Turn On -DLIBCXX_ENABLE_BENCHMARKS by default.
This patch enables the `cxx-benchmarks` target by default. Note that the target
still has to be manually invoked since it isn't included in the default 'make'
rule.

This patch also gets the benchmarks building w/ GCC. The build previously
required the '-stdlib=libc++' flag but upstream patches to Google Benchmark
now allow the library to build w/ libc++ and GCC.

These changes should make the benchmarks easier to build and test.

llvm-svn: 279999
2016-08-29 19:50:49 +00:00
Eric Fiselier a13a2056f6 [Docs] Update libc++ target names after r279675.
llvm-svn: 279940
2016-08-28 18:33:08 +00:00
Petr Hosek 9e49a3376e Allow building both shared and static library
This change allows building both shared and static version of libc++
in a single build, sharing object files between both versions.

Differential Revision: https://reviews.llvm.org/D23232

llvm-svn: 278068
2016-08-08 22:57:25 +00:00
Eric Fiselier b08d8b189c [libcxx] Add support for benchmark tests using Google Benchmark.
Summary:
This patch does the following:

1. Checks in a copy of the Google Benchmark library into the libc++ repo under `utils/google-benchmark`.
2. Teaches libc++ how to build Google Benchmark against both (A) in-tree libc++ and (B) the platforms native STL.
3. Allows performance benchmarks to be built as part of the libc++ build.

Building the benchmarks (and Google Benchmark) is off by default. It must be enabled using the CMake option `-DLIBCXX_INCLUDE_BENCHMARKS=ON`. When this option is enabled the tests under `libcxx/benchmarks`  can be built using the `libcxx-benchmarks` target.

On Linux platforms where libstdc++ is the default STL the CMake option `-DLIBCXX_BUILD_BENCHMARKS_NATIVE_STDLIB=ON` can be used to build each benchmark test against libstdc++ as well. This is useful for comparing performance between standard libraries.

Support for benchmarks is currently very minimal. They must be manually run by the user and there is no mechanism for detecting performance regressions.

Known Issues:

* `-DLIBCXX_INCLUDE_BENCHMARKS=ON` is only supported for Clang, and not GCC, since the `-stdlib=libc++` option is needed to build Google Benchmark.








Reviewers: danalbert, dberlin, chandlerc, mclow.lists, jroelofs

Subscribers: chandlerc, dberlin, tberghammer, danalbert, srhines, hfinkel

Differential Revision: https://reviews.llvm.org/D22240

llvm-svn: 276049
2016-07-19 23:07:03 +00:00
Eric Fiselier c79795874a Add Filesystem TS -- Complete
Add the completed std::experimental::filesystem implementation and tests.
The implementation supports C++11 or newer.

The TS is built as part of 'libc++experimental.a'. Users of the TS need to
manually link this library. Building and testing the TS can be disabled using
the CMake option '-DLIBCXX_ENABLE_FILESYSTEM=OFF'.

Currently 'libc++experimental.a' is not installed by default. To turn on the
installation of the library use '-DLIBCXX_INSTALL_EXPERIMENTAL_LIBRARY=ON'.

llvm-svn: 273034
2016-06-17 19:46:40 +00:00
Eric Fiselier e44604aec7 Update libcxx.llvm.org documentation by linking to new docs.
Summary:
Currently much of the libcxx website is duplicated between the old www/ documentation and newer Sphinx docs. This patch changes the main libc++ webpage so that it links to the new documentation where possible. This means removing numerous sections from the landing page.

@mclow.lists What do you think?

Reviewers: mclow.lists

Subscribers: cfe-commits, mclow.lists

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

llvm-svn: 271469
2016-06-02 02:16:28 +00:00
Eric Fiselier 539cd6758b Add documentation for new experimental library
llvm-svn: 268456
2016-05-03 22:32:08 +00:00
Alexey Samsonov f094e0f3e3 [docs] Remove references to autoconf build.
llvm-svn: 259281
2016-01-30 01:11:42 +00:00
Eric Fiselier 08ce75b6c6 Update paths in libc++ build instructions. Patch from Jonathan Anderson.
llvm-svn: 255561
2015-12-14 22:26:28 +00:00
Eric Fiselier 1ab69fc532 [libcxx] Make libc++.so a linker script by default on most platforms.
Summary:
This patch turns on `LIBCXX_ENABLE_ABI_LINKER_SCRIPT` by default whenever `LLVM_HAVE_LINK_VERSION_SCRIPT` is ON. This turns out to be whenever:

1. WIN32 is not defined.
2 UNIX is defined.
3. APPLE is not defined.

While `LLVM_HAVE_LINK_VERSION_SCRIPT` is meant to reflect exactly what we are asking I think it's close enough.

After committing this patch Linux users will no longer have to use "-lc++abi" explicitly!




Reviewers: mclow.lists, danalbert, compnerd, jroelofs

Subscribers: emaste, rengolin, cbergstrom, cfe-commits

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

llvm-svn: 250469
2015-10-15 22:41:51 +00:00
Evgeniy Stepanov a66a7b30ce ABI versioning macros for libc++.
C++ macros and CMake options that specify the default ABI version of
the library, and can be overridden to pick up new ABI-changing
features.

llvm-svn: 250254
2015-10-13 23:48:28 +00:00
Eric Fiselier 27c1e5c2a9 Cleanup BuildingLibcxx.rst and remove TODO
llvm-svn: 246952
2015-09-06 23:31:16 +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