diff options
Diffstat (limited to 'doc/manual.rst')
-rw-r--r-- | doc/manual.rst | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/doc/manual.rst b/doc/manual.rst index 82487a385..50d3a9baa 100644 --- a/doc/manual.rst +++ b/doc/manual.rst @@ -6560,18 +6560,31 @@ The ``link`` pragma can be used to link an additional file with the project: PassC pragma ------------ -The ``passC`` pragma can be used to pass additional parameters to the C -compiler like you would using the commandline switch ``--passC``: +The ``passc`` pragma can be used to pass additional parameters to the C +compiler like you would using the commandline switch ``--passc``: .. code-block:: Nim - {.passC: "-Wall -Werror".} + {.passc: "-Wall -Werror".} Note that you can use ``gorge`` from the `system module <system.html>`_ to embed parameters from an external command that will be executed during semantic analysis: .. code-block:: Nim - {.passC: gorge("pkg-config --cflags sdl").} + {.passc: gorge("pkg-config --cflags sdl").} + + +LocalPassc pragma +----------------- +The ``localPassc`` pragma can be used to pass additional parameters to the C +compiler, but only for the C/C++ file that is produced from the Nim module +the pragma resides in: + +.. code-block:: Nim + # Module A.nim + # Produces: A.nim.cpp + {.localPassc: "-Wall -Werror".} # Passed when compiling A.nim.cpp + PassL pragma ------------ |