Add support in CMake to statically link the C++ standard library.
authorErich Keane <erich.keane@intel.com>
Wed, 14 Aug 2019 19:55:59 +0000 (19:55 +0000)
committerErich Keane <erich.keane@intel.com>
Wed, 14 Aug 2019 19:55:59 +0000 (19:55 +0000)
commit0e85f18ded9c03b8b41931cec7ad16d104ec4c14
treec21fbb260cb6a4e462b56b57f10e52c5be737a32
parentda0435a6900731a9a31330fdb55c4f46f4949060
Add support in CMake to statically link the C++ standard library.

It is sometimes useful to have the C++ standard library linked into the
assembly when compiling clang, particularly when distributing a compiler
onto systems that don't have a copy of stdlibc++ or libc++ installed.

This functionality should work with either GCC or Clang as the host
compiler, though statically linking libc++ (as may be required for
licensing purposes) is only possible if the host compiler is Clang with
a copy of libc++ available.

Differential Revision: https://reviews.llvm.org/D65603

llvm-svn: 368907
llvm/CMakeLists.txt
llvm/cmake/modules/HandleLLVMStdlib.cmake
llvm/docs/CMake.rst