style improvements; fixes #11774

This commit is contained in:
Araq
2019-07-19 17:25:04 +02:00
parent 313cc337f2
commit 5a020d641d
6 changed files with 9 additions and 9 deletions

View File

@@ -120,10 +120,10 @@
# - state in static libs gets duplicated
# - linking is slow and therefore iteration time suffers
# - have just a single .dll for all .nim files and bulk reload?
# - think about the compile/link/passC/passL/emit/injectStmt pragmas
# - if a passC pragma is introduced (either written or dragged in by a new
# - think about the compile/link/passc/passl/emit/injectStmt pragmas
# - if a passc pragma is introduced (either written or dragged in by a new
# import) the whole command line for compilation changes - for example:
# winlean.nim: {.passC: "-DWIN32_LEAN_AND_MEAN".}
# winlean.nim: {.passc: "-DWIN32_LEAN_AND_MEAN".}
# - play with plugins/dlls/lfIndirect/lfDynamicLib/lfExportLib - shouldn't add an extra '*'
# - everything thread-local related
# - tests

View File

@@ -122,7 +122,7 @@ when defined(unix):
const extra = " -D_XOPEN_SOURCE"
else:
const extra = ""
{.passC: "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" & extra.}
{.passc: "-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0" & extra.}
const
CORO_CREATED = 0

View File

@@ -1110,7 +1110,7 @@ proc waitFor(socket: Socket, waited: var Duration, timeout, size: int,
if selRet < 0: raiseOSError(osLastError())
if selRet != 1:
raise newException(TimeoutError, "Call to '" & funcName & "' timed out.")
waited += (getMonoTIme() - startTime)
waited += (getMonoTime() - startTime)
proc recv*(socket: Socket, data: pointer, size: int, timeout: int): int {.
tags: [ReadIOEffect, TimeEffect].} =

View File

@@ -4060,7 +4060,7 @@ proc staticExec*(command: string, input = "", cache = ""): string {.
## `gorge <#gorge,string,string,string>`_ is an alias for ``staticExec``.
##
## Note that you can use this proc inside a pragma like
## `passC <nimc.html#passc-pragma>`_ or `passL <nimc.html#passl-pragma>`_.
## `passc <nimc.html#passc-pragma>`_ or `passl <nimc.html#passl-pragma>`_.
##
## If ``cache`` is not empty, the results of ``staticExec`` are cached within
## the ``nimcache`` directory. Use ``--forceBuild`` to get rid of this caching

View File

@@ -108,10 +108,10 @@ elif defined(genode):
else:
when not (defined(macosx) or defined(haiku)):
{.passL: "-pthread".}
{.passl: "-pthread".}
when not defined(haiku):
{.passC: "-pthread".}
{.passc: "-pthread".}
const
schedh = "#define _GNU_SOURCE\n#include <sched.h>"

View File

@@ -20,7 +20,7 @@
##
## .. code-block::
## ./bin/nim c -d:ssl -p:. -r tests/untestable/tssl.nim
## ./bin/nim c -d:ssl -p:. --dynlibOverride:ssl --passL:-lcrypto --passL:-lssl -r tests/untestable/tssl.nim
## ./bin/nim c -d:ssl -p:. --dynlibOverride:ssl --passl:-lcrypto --passl:-lssl -r tests/untestable/tssl.nim
{.deadCodeElim: on.} # dce option deprecated
when defined(nimHasStyleChecks):