--usenimcache (implied by nim r main) now caches some compile options to avoid recompiling when project was previously compiled with such options. (#17829)
* `--usenimcache` (implied by `nim r main`) now caches some compile options to avoid recompiling when project was previously compiled with such options. * works * add test * changelog * use std/with
This commit is contained in:
parent
e67593d317
commit
ffe4328b35
6 changed files with 91 additions and 52 deletions
|
|
@ -970,18 +970,3 @@ proc floatInt64Align*(conf: ConfigRef): int16 =
|
|||
# to 4bytes (except with -malign-double)
|
||||
return 4
|
||||
return 8
|
||||
|
||||
proc setOutFile*(conf: ConfigRef) =
|
||||
proc libNameTmpl(conf: ConfigRef): string {.inline.} =
|
||||
result = if conf.target.targetOS == osWindows: "$1.lib" else: "lib$1.a"
|
||||
|
||||
if conf.outFile.isEmpty:
|
||||
let base = conf.projectName
|
||||
let targetName =
|
||||
if optGenDynLib in conf.globalOptions:
|
||||
platform.OS[conf.target.targetOS].dllFrmt % base
|
||||
elif optGenStaticLib in conf.globalOptions:
|
||||
libNameTmpl(conf) % base
|
||||
else:
|
||||
base & platform.OS[conf.target.targetOS].exeExt
|
||||
conf.outFile = RelativeFile targetName
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue