addQuitProc now works with closures, and c, js(node/browser) backend; fix some bugs in testament (#14342)
* make addQuitProc great again * fix bugs in testament * fix test * change 2016 => 2020 * addQuitProc => addExitProc + locks * move to std/exitprocs
This commit is contained in:
parent
45cac4afda
commit
dfe51d10a1
9 changed files with 117 additions and 44 deletions
|
|
@ -87,6 +87,13 @@ const
|
|||
targetToExt*: array[TTarget, string] = ["nim.c", "nim.cpp", "nim.m", "js"]
|
||||
targetToCmd*: array[TTarget, string] = ["c", "cpp", "objc", "js"]
|
||||
|
||||
proc defaultOptions*(a: TTarget): string =
|
||||
case a
|
||||
of targetJS: "-d:nodejs"
|
||||
# once we start testing for `nim js -d:nimbrowser` (eg selenium or similar),
|
||||
# we can adapt this logic; or a given js test can override with `-u:nodejs`.
|
||||
else: ""
|
||||
|
||||
when not declared(parseCfgBool):
|
||||
# candidate for the stdlib:
|
||||
proc parseCfgBool(s: string): bool =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue