summaryrefslogtreecommitdiffstats
path: root/llvm/docs
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2019-08-14 19:55:59 +0000
committerErich Keane <erich.keane@intel.com>2019-08-14 19:55:59 +0000
commit0e85f18ded9c03b8b41931cec7ad16d104ec4c14 (patch)
treec21fbb260cb6a4e462b56b57f10e52c5be737a32 /llvm/docs
parentda0435a6900731a9a31330fdb55c4f46f4949060 (diff)
downloadbcm5719-llvm-0e85f18ded9c03b8b41931cec7ad16d104ec4c14.tar.gz
bcm5719-llvm-0e85f18ded9c03b8b41931cec7ad16d104ec4c14.zip
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
Diffstat (limited to 'llvm/docs')
-rw-r--r--llvm/docs/CMake.rst5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index cbddad5746d..2c54fde4393 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -431,6 +431,11 @@ LLVM-specific variables
passed to invocations of both so that the project is built using libc++
instead of stdlibc++. Defaults to OFF.
+**LLVM_STATIC_LINK_CXX_STDLIB**:BOOL
+ Statically link to the C++ standard library if possible. This uses the flag
+ "-static-libstdc++", but a Clang host compiler will statically link to libc++
+ if used in conjuction with the **LLVM_ENABLE_LIBCXX** flag. Defaults to OFF.
+
**LLVM_ENABLE_LLD**:BOOL
This option is equivalent to `-DLLVM_USE_LINKER=lld`, except during a 2-stage
build where a dependency is added from the first stage to the second ensuring
OpenPOWER on IntegriCloud