cxx/utils
Eric Fiselier 8cbf020fdc [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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250319 91177308-0d34-0410-b5e6-96231b3b80d8
2015-10-14 19:54:03 +00:00
..
gen_link_script [libcxx] Make it drastically simpler to link libc++. 2015-10-14 19:54:03 +00:00
not [libcxx] Allow use of ShTest in libc++ tests along with other changes. 2015-01-22 18:05:58 +00:00
sym_check cleanup comments in sym_check 2015-03-27 06:04:37 +00:00