aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2022-11-24 09:41:07 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2022-11-24 09:41:07 +0200
commita98ddbbf1c88e4ff29b20b8256e8b9c8fc1c2507 (patch)
tree9afcc924e46e1192e93d31987691aae03c24cb9b /doc
parentfbb1fc469da566dd21be47a7998dfad11d3085b7 (diff)
Document Objective-C/C++ support in manual
Diffstat (limited to 'doc')
-rw-r--r--doc/manual.cli57
1 files changed, 57 insertions, 0 deletions
diff --git a/doc/manual.cli b/doc/manual.cli
index 0f170ea..9b89345 100644
--- a/doc/manual.cli
+++ b/doc/manual.cli
@@ -7128,6 +7128,35 @@ config.c.internal.scope
\
+\h#c-objc|Objective-C Compilation|
+
+The \c{c} module provides the \c{c.objc} submodules which can be loaded in
+order to register the \c{m{\}} target type and enable Objective-C compilation
+in the \c{C} compile rule. Note that \c{c.objc} must be loaded after the \c{c}
+module and while the \c{m{\}} target type is registered unconditionally,
+compilation is only enabled if the C compiler supports Objective-C for the
+target platform. Typical usage:
+
+\
+# root.build
+#
+using c
+using c.objc
+\
+
+\
+# buildfile
+#
+lib{hello}: {h c}{*}
+lib{hello}: m{*}: include = ($c.target.class == 'macos')
+\
+
+Note also that while there is support for linking Objective-C executables and
+libraries, this is done using the C compiler driver and no attempt is made to
+automatically link any necessary Objective-C runtime library (such as
+\c{-lobjc}).
+
+
\h1#module-cxx|\c{cxx} Module|
\N{This chapter is a work in progress and is incomplete.}
@@ -8780,6 +8809,34 @@ macros may not be needed by all consumers. This way we can also keep the
header macro-only which means it can be included freely, in or out of module
purviews.
+\h#cxx-objcxx|Objective-C++ Compilation|
+
+The \c{cxx} module provides the \c{cxx.objcxx} submodules which can be loaded
+in order to register the \c{mm{\}} target type and enable Objective-C++
+compilation in the \c{C++} compile rule. Note that \c{cxx.objcxx} must be
+loaded after the \c{cxx} module and while the \c{mm{\}} target type is
+registered unconditionally, compilation is only enabled if the C++ compiler
+supports Objective-C++ for the target platform. Typical usage:
+
+\
+# root.build
+#
+using cxx
+using cxx.objcxx
+\
+
+\
+# buildfile
+#
+lib{hello}: {hxx cxx}{*}
+lib{hello}: mm{*}: include = ($cxx.target.class == 'macos')
+\
+
+Note also that while there is support for linking Objective-C++ executables
+and libraries, this is done using the C++ compiler driver and no attempt is
+made to automatically link any necessary Objective-C runtime library (such as
+\c{-lobjc}).
+
\h1#module-in|\c{in} Module|