Summary:
This patch allows the use of LIT's ShTest format in the libc++ test suite. ShTests have the suffix '.sh.cpp'. It also introduces a series of other changes. These changes are:
- More functionality including parsing test metadata has been moved into LIT.
- LibcxxTestFormat now supports multi-part suffixes.
- the `CXXCompiler` functionality has been used to shrink the size of LibcxxTestFormat.
- The recursive loading of the site config has been turned into `libcxx.test.config.loadSiteConfig` so it can be used with libc++abi.
- Temporary files are now created in the build directory of libc++. This follows how it is down in ShTest.
- `not.py` was added as a utility executable that mirrors the functionality of LLVM's `not` executable.
- The first ShTest test was added under test/libcxx/double_include.sh.cpp
Reviewers: jroelofs, danalbert
Reviewed By: danalbert
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D7073
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226844 91177308-0d34-0410-b5e6-96231b3b80d8
When 'no_default_flags' is true only flags passed using '--param=compile_flags'
and '--param=link_flags' will be used when compiling the tests. This option
can be used to run the test suite against libstdc++ and helps with all
unusual test suite configurations.
NOTE: sanitizer flags are still added when '--param=use_sanitizer' is used even
if '--param=no_default_flags' is given.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@226322 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
In order to fully replace the testit script we need to update LIT so it provides the same functionality.
This patch adds a number of different configuration options to LIT to do that. It also adds documentation for all of the command line parameters that LIT supports.
Generic options added:
- `libcxx_headers`
- `libcxx_library`
- `compile_flags`
Generic options modified:
- `link_flags`: Changed from overriding the default args to adding extra args instead (to match compile flags)
- `use_sanitizer`: Renamed from `llvm_use_sanitizer`
Please see the added documentation for more information about the switches. As for the actual documentation I'm not sure if it should be kept in libc++ forever since it adds an undue maintenance burden, but I think it should be added for the time being while the changes are new. I'm verify unskilled with HTML so if the documentation needs any changes please let me know.
Hopefully this will kill testit.
Reviewers: jroelofs, mclow.lists, danalbert
Reviewed By: danalbert
Subscribers: alexfh, cfe-commits
Differential Revision: http://reviews.llvm.org/D5877
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224728 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Currently to run tests in tree you need to symlink the lit.site.cfg file generated by the cmake build into the source tree, and teach your VCS to ignore it.
This allows the user to specify where to find the lit.site.cfg file two different ways:
* lit_site_config lit parameter
* LIT_SITE_CONFIG enviroment variable.
example usage:
```
lit -sv --param=libcxx_site_config=path/to/libcxx-build/test/lit.site.cfg path/to/tests
```
Or
```
export LIBCXX_SITE_CONFIG=path/to/libcxx-build/test/lit.site.cfg
lit -sv path/to/tests
```
The command line parameter will override the environment variable.
If neither options are present a warning is issued and the `lit.cfg` file is loaded directly.
Reviewers: mclow.lists, jroelofs, danalbert
Reviewed By: danalbert
Subscribers: ddunbar, cfe-commits
Differential Revision: http://reviews.llvm.org/D6255
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@224671 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This is the second attempt at allowing for the use of libraries that the linker cannot find. The first attempt used `CMAKE_LIBRARY_PATH` and `find_library` to select which ABI library should be used. There were a number of problems with this approach:
- `find_library` didn't work with cmake targets (ie in-tree libcxxabi build)
- It wasn't always possible to determine where `find_library` actually found your library.
- `target_link_libraries` inserted the path of the ABI library into libc++'s RPATH when `find_library` was used.
- Linking libc++ and it's ABI library is a special case. It's a lot easier to keep it simple.
After discussion with @cbergstrum a new approach was decided upon.
This patch achieve the same ends by simply using `LIBCXX_CXX_ABI_LIBRARY_PATH` to specify where to find the library (if the linker won't find it). When this variable is defined it is simply added as a library search path when linking libc++. It is a lot easier to duplicate this behavior in LIT. It also prevents libc++ from being linked with an RPATH.
Reviewers: mclow.lists, cbergstrom, chandlerc, danalbert
Reviewed By: chandlerc, danalbert
Subscribers: chandlerc, cfe-commits
Differential Revision: http://reviews.llvm.org/D5860
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@220157 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch adds support for building/testing libc++ with an ABI library that the linker would not normally find.
- `CMAKE_LIBRARY_PATH` is used to specify the list of search directories.
- The ABI library is now found using `find_library` instead of assuming its along the linker's search path.
- `CMAKE_LIBRARY_PATH` is passed to our LIT config as `library_paths`.
- For each path in `library_paths` the following flags are added `-L<path> -Wl,-rpath -Wl,<path>`
Some changes in existing behavior were also added:
- `target_link_libraries` is now passed the ABI library file instead of the library name. Ex `target_link_libraries(cxx "/usr/lib/libc++abi.so")` vs `target_link_libraries(cxx "c++abi")`.
- `-Wl,-rpath -Wl,<path>` is now used on OSX to link to libc++ instead of env['DYLD_LIBRARY_PATH'] if `use_system_lib=False`.
Reviewers: mclow.lists, danalbert, EricWF
Reviewed By: EricWF
Subscribers: emaste, cfe-commits
Differential Revision: http://reviews.llvm.org/D5038
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@220118 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
Instead of having to update test results for different platforms it would be helpful to just supply links to buildbots that build+test libcxx.
For the FreeBSD bots Pawel Worach gave me the OK to link to them.
Reviewers: mclow.lists, danalbert
Reviewed By: danalbert
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4947
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215882 91177308-0d34-0410-b5e6-96231b3b80d8
Okay, so this actually does more than just that. I've rearranged most of
the information on the page to try to make it more helpful and flow
better. Essentially, the differences between Mac and Linux, the various
ABI libraries, and in-tree versus out-of-tree builds were cluttering
things. To clean up, I've done the following:
* Only describe the cmake process. buildit doesn't work out of the box
on Linux, and we need to stop having duplicates for every process.
* Use libc++abi for the default instructions. This works on the major
platforms.
* Describe both in-tree and out-of-tree builds. Previously it wasn't
clear that in-tree builds were even possible for libc++.
* Separate the documentation about using libc++ from that about
building and testing libc++.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@215358 91177308-0d34-0410-b5e6-96231b3b80d8
Summary:
This patch adds the `<experimental/utility>` header as specified in the latest draft of the library fundamentals TS.
`<experimental/utility>` only contains `class erased_type`.
This patch also updates the documentation to list the `erased_type` class as "initial implementation complete".
Test Plan:
Three test cases where added:
1. Test that `_LIBCPP_VERSION` is defined.
2. Test that `<utility>` has been included.
3. Test that `erased_type` is in the correct namespace and is constexpr default constructible.
Reviewers: mclow.lists
Reviewed By: mclow.lists
Subscribers: cfe-commits
Differential Revision: http://reviews.llvm.org/D4510
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@213226 91177308-0d34-0410-b5e6-96231b3b80d8
to remove redundant wording, which required no changes to libc++. 2075 was a
rewrite of the requirements for forward progress, and again, requires no changes
to the library.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@204724 91177308-0d34-0410-b5e6-96231b3b80d8
Also mark #2104 as complete. Leave the implementation in libc++ as noexcept, since
implementations are allowed to add noexcept to non-virtual calls. If we throw from
unique_lock& operator=(unique_lock&& u), then that means the preconditions were violated,
and calling terminate() (as a result of throwing from a noexcept function) is as
good example of undefined behavior as any other.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@204653 91177308-0d34-0410-b5e6-96231b3b80d8
This is as straightforward as it sounds, a renamed from shared_mutex to
shared_timed_mutex.
Note that libcxx .dylib and .so files built with c++14 support need to
be rebuilt.
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@204078 91177308-0d34-0410-b5e6-96231b3b80d8