Documents passC/passL pragmas. Refs #506.
This commit is contained in:
parent
ebd45529c1
commit
6bab7a5bda
3 changed files with 40 additions and 5 deletions
|
|
@ -292,6 +292,35 @@ The `link`:idx: pragma can be used to link an additional file with the project:
|
|||
{.link: "myfile.o".}
|
||||
|
||||
|
||||
PassC pragma
|
||||
------------
|
||||
The `passC`:idx: pragma can be used to pass additional parameters to the C
|
||||
compiler like you would using the commandline switch ``--passC``:
|
||||
|
||||
.. code-block:: Nimrod
|
||||
{.passC: "-Wall -Werror".}
|
||||
|
||||
Note that you can use ``gorge`` from the `system module <system.html>`_ to
|
||||
embed parameters from an external command at compile time:
|
||||
|
||||
.. code-block:: Nimrod
|
||||
{.passC: gorge("pkg-config --cflags sdl").}
|
||||
|
||||
PassL pragma
|
||||
------------
|
||||
The `passL`:idx: pragma can be used to pass additional parameters to the linker
|
||||
like you would using the commandline switch ``--passL``:
|
||||
|
||||
.. code-block:: Nimrod
|
||||
{.passL: "-lSDLmain -lSDL".}
|
||||
|
||||
Note that you can use ``gorge`` from the `system module <system.html>`_ to
|
||||
embed parameters from an external command at compile time:
|
||||
|
||||
.. code-block:: Nimrod
|
||||
{.passL: gorge("pkg-config --libs sdl").}
|
||||
|
||||
|
||||
Emit pragma
|
||||
-----------
|
||||
The `emit`:idx: pragma can be used to directly affect the output of the
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue