diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2020-06-15 23:56:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-16 08:56:12 +0200 |
commit | 45cac4afda2272182ea1eb7572493d6c71e2da4e (patch) | |
tree | c4ad177691a0a62d3967d3b3189022efdb1c8422 /lib/system | |
parent | 7b12f13946e833d85ddfe23fafee0c808b27bafb (diff) | |
download | Nim-45cac4afda2272182ea1eb7572493d6c71e2da4e.tar.gz |
fix #14179, fix #14142, make CI 1.4x faster (2x faster locally) (#14658)
* fix #14142: no more clash with: import os + use of existsDir/dirExists/existsFile/fileExists/findExe in config.nims * remove a comment * Revert "fixes the regression #12860 caused; hotfix" This reverts commit 3d2459bdc0b6d6236a2cd9209ed81c965ee411a5. * Revert "Undefine `paramCount` & `paramStr` in nimscript.nim for *.nims (#12860)" This reverts commit d38853c504d89d6e361f064a17391afaf42d74b8. * noNimScript => noWeirdTarget + noNimJs
Diffstat (limited to 'lib/system')
-rw-r--r-- | lib/system/nimscript.nim | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/system/nimscript.nim b/lib/system/nimscript.nim index da5c291fa..ceaaef013 100644 --- a/lib/system/nimscript.nim +++ b/lib/system/nimscript.nim @@ -56,6 +56,14 @@ proc rawExec(cmd: string): int {.tags: [ExecIOEffect], raises: [OSError].} = proc warningImpl(arg, orig: string) = discard proc hintImpl(arg, orig: string) = discard +proc paramStr*(i: int): string = + ## Retrieves the ``i``'th command line parameter. + builtin + +proc paramCount*(): int = + ## Retrieves the number of command line parameters. + builtin + proc switch*(key: string, val="") = ## Sets a Nim compiler command line switch, for ## example ``switch("checks", "on")``. @@ -272,9 +280,6 @@ proc selfExec*(command: string) {. raise newException(OSError, "FAILED: " & c) checkOsError() -from os import paramCount, paramStr -export paramCount, paramStr - proc put*(key, value: string) = ## Sets a configuration 'key' like 'gcc.options.always' to its value. builtin |