summaryrefslogtreecommitdiffstats
path: root/clang/docs/Modules.rst
diff options
context:
space:
mode:
Diffstat (limited to 'clang/docs/Modules.rst')
-rw-r--r--clang/docs/Modules.rst7
1 files changed, 6 insertions, 1 deletions
diff --git a/clang/docs/Modules.rst b/clang/docs/Modules.rst
index 493c54d3913..7aee4ffee2d 100644
--- a/clang/docs/Modules.rst
+++ b/clang/docs/Modules.rst
@@ -411,7 +411,7 @@ A *requires-declaration* specifies the requirements that an importing translatio
*feature*:
``!``:sub:`opt` *identifier*
-The requirements clause allows specific modules or submodules to specify that they are only accessible with certain language dialects or on certain platforms. The feature list is a set of identifiers, defined below. If any of the features is not available in a given translation unit, that translation unit shall not import the module. When building a module for use by a compilation, submodules requiring unavailable features are ignored. The optional ``!`` indicates that a feature is incompatible with the module.
+The requirements clause allows specific modules or submodules to specify that they are only accessible with certain language dialects, platforms, environments and target specific features. The feature list is a set of identifiers, defined below. If any of the features is not available in a given translation unit, that translation unit shall not import the module. When building a module for use by a compilation, submodules requiring unavailable features are ignored. The optional ``!`` indicates that a feature is incompatible with the module.
The following features are defined:
@@ -466,6 +466,11 @@ tls
*target feature*
A specific target feature (e.g., ``sse4``, ``avx``, ``neon``) is available.
+*platform/os*
+ A os/platform variant (e.g. ``freebsd``, ``win32``, ``windows``, ``linux``, ``ios``, ``macos``, ``iossimulator``) is available.
+
+*environment*
+ A environment variant (e.g. ``gnu``, ``gnueabi``, ``android``, ``msvc``) is available.
**Example:** The ``std`` module can be extended to also include C++ and C++11 headers using a *requires-declaration*:
OpenPOWER on IntegriCloud