llvm-project/libcxx/test
Eric Fiselier 8241405ad4 [libcxx] Make it drastically simpler to link libc++.
Summary:
Currently on most platforms you have to manually link the c++ abi library used with libc++ whenever you use libc++. So your typical libc++ command like invocation might look like:

```
clang++ -stdlib=libc++ foo.cpp -lc++abi
```

Having to manually link `libc++abi.so` makes it harder for libc++ to be used generically. This patch fixes that by generating a linker script for `libc++.so` that correctly links the ABI library. On linux the linker script for libc++abi would look like:

```
# libc++.so
INPUT(libc++.so.1 -lc++abi)
```

With the linker script you can now use libc++ using only `-stdlib=libc++`. This is the technique that is used on FreeBSD in ordered to link cxxrt and I think it's the best approach to make our users lives simpler.

The CMake option used to enable this is `LIBCXX_ENABLE_ABI_LINKER_SCRIPT`. In future I would like to enable this by default on all platforms except for Darwin.

Reviewers: mclow.lists, danalbert, rsmith, jroelofs, EricWF

Subscribers: cfe-commits

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

llvm-svn: 250319
2015-10-14 19:54:03 +00:00
..
libcxx Split out config_site logic so libc++abi can use it 2015-10-14 19:00:35 +00:00
std Fix use of libc++ <foo.h> headers from within an 'extern "C"' context in C++98. 2015-10-13 23:12:22 +00:00
support Our test allocators support move/copy construction; they should support move/copy assignment as well 2015-10-06 20:30:56 +00:00
CMakeLists.txt [libcxx] Make it drastically simpler to link libc++. 2015-10-14 19:54:03 +00:00
lit.cfg [libcxx] Allow use of ShTest in libc++ tests along with other changes. 2015-01-22 18:05:58 +00:00
lit.site.cfg.in [libcxx] Use __config_site to configure the test suite features. 2015-10-14 18:22:15 +00:00
nothing_to_do.pass.cpp Test commit: Reverting whitespace changes 2014-07-17 05:10:03 +00:00
testit Apply patch for Albert Wong: 'Modify testit to allow filtering tests by prefixes'. 2014-01-15 16:28:42 +00:00