]> granicus.if.org Git - llvm/commit
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)
commit89ae9075200c4ce8b9f8526907594cf689099b57
tree221a0a31414ce743b0414a320f709c388e5d4ba5
parent2c37331f5c41e44eaf3753c371a25aa7ddb02097
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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@368907 91177308-0d34-0410-b5e6-96231b3b80d8
CMakeLists.txt
cmake/modules/HandleLLVMStdlib.cmake
docs/CMake.rst