[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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@250469 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2015-10-15 22:41:51 +00:00
parent 7b081f6bc5
commit bb856cc357
4 changed files with 48 additions and 6 deletions

View File

@@ -54,10 +54,10 @@ An example of using ``LD_LIBRARY_PATH``:
Using libc++ on Linux
=====================
On Linux libc++ typically links to a shared version of libc++abi. Unfortunately
you can't simply run clang with "-stdlib=libc++" as clang is not set up to
link for this configuration. To get around this you'll have to manually
link libc++abi yourself. For example:
On Linux libc++ can typically be used with only '-stdlib=libc++'. However
some libc++ installations require the user manually link libc++abi themselves.
If you are running into linker errors when using libc++ try adding '-lc++abi'
to the link line. For example:
.. code-block:: bash