Use passc and passl consistently with compiler checking (#20068)
This commit is contained in:
parent
efcb89fa70
commit
1a9123eb90
1 changed files with 7 additions and 7 deletions
|
|
@ -7215,7 +7215,7 @@ The `link` pragma can be used to link an additional file with the project:
|
||||||
{.link: "myfile.o".}
|
{.link: "myfile.o".}
|
||||||
|
|
||||||
|
|
||||||
PassC pragma
|
passc pragma
|
||||||
------------
|
------------
|
||||||
The `passc` pragma can be used to pass additional parameters to the C
|
The `passc` pragma can be used to pass additional parameters to the C
|
||||||
compiler like one would using the command-line switch `--passc`:option:\:
|
compiler like one would using the command-line switch `--passc`:option:\:
|
||||||
|
|
@ -7243,20 +7243,20 @@ the pragma resides in:
|
||||||
{.localPassC: "-Wall -Werror".} # Passed when compiling A.nim.cpp
|
{.localPassC: "-Wall -Werror".} # Passed when compiling A.nim.cpp
|
||||||
|
|
||||||
|
|
||||||
PassL pragma
|
passl pragma
|
||||||
------------
|
------------
|
||||||
The `passL` pragma can be used to pass additional parameters to the linker
|
The `passl` pragma can be used to pass additional parameters to the linker
|
||||||
like one would be using the command-line switch `--passL`:option:\:
|
like one would be using the command-line switch `--passl`:option:\:
|
||||||
|
|
||||||
.. code-block:: Nim
|
.. code-block:: Nim
|
||||||
{.passL: "-lSDLmain -lSDL".}
|
{.passl: "-lSDLmain -lSDL".}
|
||||||
|
|
||||||
Note that one can use `gorge` from the `system module <system.html>`_ to
|
Note that one can use `gorge` from the `system module <system.html>`_ to
|
||||||
embed parameters from an external command that will be executed
|
embed parameters from an external command that will be executed
|
||||||
during semantic analysis:
|
during semantic analysis:
|
||||||
|
|
||||||
.. code-block:: Nim
|
.. code-block:: Nim
|
||||||
{.passL: gorge("pkg-config --libs sdl").}
|
{.passl: gorge("pkg-config --libs sdl").}
|
||||||
|
|
||||||
|
|
||||||
Emit pragma
|
Emit pragma
|
||||||
|
|
@ -7570,7 +7570,7 @@ allows *sloppy* interfacing with libraries written in Objective C:
|
||||||
.. code-block:: Nim
|
.. code-block:: Nim
|
||||||
# horrible example of how to interface with GNUStep ...
|
# horrible example of how to interface with GNUStep ...
|
||||||
|
|
||||||
{.passL: "-lobjc".}
|
{.passl: "-lobjc".}
|
||||||
{.emit: """
|
{.emit: """
|
||||||
#include <objc/Object.h>
|
#include <objc/Object.h>
|
||||||
@interface Greeter:Object
|
@interface Greeter:Object
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue