summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2022-08-04 16:35:17 -0400
committerMatthew Pickering <matthewtpickering@gmail.com>2022-08-31 13:16:01 +0100
commit837472b4895232c9ef06949b0c2af4dbac96744c (patch)
tree640844199d771195a5185984a7db703b92eaec9c
parent4c1e7b22a25f427b489552275aaa222c71e6ef43 (diff)
downloadhaskell-837472b4895232c9ef06949b0c2af4dbac96744c.tar.gz
users-guide: Document system-cxx-std-lib
-rw-r--r--docs/users_guide/packages.rst20
1 files changed, 20 insertions, 0 deletions
diff --git a/docs/users_guide/packages.rst b/docs/users_guide/packages.rst
index 2d515ee8e4..9c57171aeb 100644
--- a/docs/users_guide/packages.rst
+++ b/docs/users_guide/packages.rst
@@ -1449,3 +1449,23 @@ The allowed fields, with their types, are:
HTML for this package.
.. [1] it used to in GHC 6.4, but not since 6.6
+
+
+.. _system-cxx-std-lib:
+
+Linking against C++ libraries
+-----------------------------
+
+.. index::
+ single: system-cxx-std-lib
+ single: packages; system-cxx-std-lib
+ single: C++; linking
+
+Use of C++ libraries requires that the user link against the host
+system's C++ standard library. As the configuration necessary to
+achieve this is generally quite platform-dependent, GHC provides a
+built-in package, ``system-cxx-std-lib``. This package captures the
+configuration necessary for linking against the C++ standard library
+and can be used via the :ghc-flag:`-package ⟨pkg⟩` flag or the Cabal
+``build-depends`` field to link code against the C++ standard
+library.