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.
Do you foresee these linker scripts being significantly more complicated for other platforms? ISTM that it would be much simpler to have CMake generate these directly.