fixes #9995
This commit is contained in:
parent
e3a668a33b
commit
39ae55e6e4
2 changed files with 5 additions and 7 deletions
|
|
@ -64,12 +64,9 @@ proc loadConfigsAndRunMainCommand*(self: NimProg, cache: IdentCache; conf: Confi
|
||||||
var tempConf = newConfigRef()
|
var tempConf = newConfigRef()
|
||||||
setDefaultLibpath(tempConf)
|
setDefaultLibpath(tempConf)
|
||||||
initDefines(tempConf.symbols)
|
initDefines(tempConf.symbols)
|
||||||
tempConf.command = conf.command
|
mergeConfigs(tempConf, conf, mergeSymbols = false)
|
||||||
tempConf.commandArgs = conf.commandArgs
|
|
||||||
tempConf.searchPaths = conf.searchPaths
|
|
||||||
tempConf.lazyPaths = conf.lazyPaths
|
|
||||||
runNimScript(cache, p, freshDefines = false, tempConf)
|
runNimScript(cache, p, freshDefines = false, tempConf)
|
||||||
mergeConfigs(conf, tempConf)
|
mergeConfigs(conf, tempConf, mergeSymbols = true)
|
||||||
|
|
||||||
# Caution: make sure this stays in sync with `loadConfigs`
|
# Caution: make sure this stays in sync with `loadConfigs`
|
||||||
if optSkipSystemConfigFile notin conf.globalOptions:
|
if optSkipSystemConfigFile notin conf.globalOptions:
|
||||||
|
|
|
||||||
|
|
@ -253,7 +253,7 @@ template depConfigFields*(fn) {.dirty.} =
|
||||||
fn(globalOptions)
|
fn(globalOptions)
|
||||||
fn(selectedGC)
|
fn(selectedGC)
|
||||||
|
|
||||||
proc mergeConfigs*(dest, src: ConfigRef) =
|
proc mergeConfigs*(dest, src: ConfigRef; mergeSymbols: bool) =
|
||||||
template merge[T: enum](a, b: T) =
|
template merge[T: enum](a, b: T) =
|
||||||
a = b
|
a = b
|
||||||
template merge[T](a, b: set[T]) =
|
template merge[T](a, b: set[T]) =
|
||||||
|
|
@ -301,6 +301,7 @@ proc mergeConfigs*(dest, src: ConfigRef) =
|
||||||
m warnCounter
|
m warnCounter
|
||||||
m errorMax
|
m errorMax
|
||||||
m configVars
|
m configVars
|
||||||
|
if mergeSymbols:
|
||||||
m symbols
|
m symbols
|
||||||
m searchPaths
|
m searchPaths
|
||||||
m lazyPaths
|
m lazyPaths
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue