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 | |
parent | ebd45529c169dbdc6fca919230f5f7f2fbf9b760 (diff) | |
download | Nim-6bab7a5bda8149110d542701cb8c86c5335df816.tar.gz |
Documents passC/passL pragmas. Refs #506.
Diffstat (limited to 'doc')
-rw-r--r-- | doc/advopt.txt | 4 | ||||
-rw-r--r-- | doc/nimrodc.txt | 29 |
2 files changed, 31 insertions, 2 deletions
diff --git a/doc/advopt.txt b/doc/advopt.txt index fc3e1e4e6..baf67cc67 100644 --- a/doc/advopt.txt +++ b/doc/advopt.txt @@ -48,8 +48,8 @@ Advanced options: --cpu:SYMBOL set the target processor (cross-compilation) --debuginfo enables debug information --debugger:on|off turn Embedded Nimrod Debugger on|off - -t, --passc:OPTION pass an option to the C compiler - -l, --passl:OPTION pass an option to the linker + -t, --passC:OPTION pass an option to the C compiler + -l, --passL:OPTION pass an option to the linker --cincludes:DIR modify the C compiler header search path --clibdir:DIR modify the linker library search path --clib:LIBNAME link an additional C library 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 |