[cleanup] remove dead code compiler.options.mergeConfigs (#10165)

This commit is contained in:
Timothee Cour
2019-01-02 01:26:40 -08:00
committed by Andreas Rumpf
parent 31b8bc7866
commit a1e268e3dc

View File

@@ -253,84 +253,6 @@ template depConfigFields*(fn) {.dirty.} =
fn(globalOptions)
fn(selectedGC)
proc mergeConfigs*(dest, src: ConfigRef; mergeSymbols: bool) =
template merge[T: enum](a, b: T) =
a = b
template merge[T](a, b: set[T]) =
a = a + b
template merge(a, b: int) =
inc a, b
template merge[T](a, b: seq[T]) =
for bb in b: a.add b
template merge(a, b: string) =
a = b
template merge[T: AbsoluteFile|AbsoluteDir](a, b: T) =
if a.isEmpty and not b.isEmpty: a = b
template merge[T](a, b: HashSet[T]) =
for bb in b: a.incl b
template merge(a, b: StringTableRef) =
for k, v in b: a[k] = v
template merge[T: object](a, b: T) =
a = b
template m(field) =
merge(dest.field, src.field)
m target
m options
m globalOptions
m cmd
m selectedGC
dest.verbosity = src.verbosity
m numberOfProcessors
m evalExpr
m symbolFiles
m cppDefines
m headerFile
m features
m arguments
m ideCmd
m cCompiler
m enableNotes
m disableNotes
m foreignPackageNotes
m notes
m errorCounter
m hintCounter
m warnCounter
m errorMax
m configVars
if mergeSymbols:
m symbols
m projectName
m projectPath
m projectFull
m searchPaths
m lazyPaths
m outFile
m prefixDir
m libpath
m nimcacheDir
m dllOverrides
m moduleOverrides
m command
m commandArgs
m implicitImports
m implicitIncludes
m docSeeSrcUrl
m cIncludes
m cLibs
m cLinkedLibs
m externalToLink
m linkOptionsCmd
m compileOptionsCmd
m linkOptions
m compileOptions
m ccompilerpath
m toCompile
m cppCustomNamespace
const oldExperimentalFeatures* = {implicitDeref, dotOperators, callOperator, parallel}
const