diff options
author | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-07-05 16:28:51 +0200 |
---|---|---|
committer | Grzegorz Adam Hankiewicz <gradha@imap.cc> | 2013-07-05 16:33:52 +0200 |
commit | 6bab7a5bda8149110d542701cb8c86c5335df816 (patch) | |
tree | ee644d86f4a52f1e9c43f632b4dcb575d7f96add /doc/nimrodc.txt | |
parent | ebd45529c169dbdc6fca919230f5f7f2fbf9b760 (diff) | |
download | Nim-6bab7a5bda8149110d542701cb8c86c5335df816.tar.gz |
Documents passC/passL pragmas. Refs #506.
Diffstat (limited to 'doc/nimrodc.txt')
-rw-r--r-- | doc/nimrodc.txt | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/nimrodc.txt b/doc/nimrodc.txt index 4ae5eae69..5e2bfb09b 100644 --- a/doc/nimrodc.txt +++ b/doc/nimrodc.txt @@ -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 |