Skip to content

Commit

Permalink
[cleanup] remove dead code compiler.options.mergeConfigs (#10165)
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour authored and Araq committed Jan 2, 2019
1 parent 31b8bc7 commit a1e268e
Showing 1 changed file with 0 additions and 78 deletions.
78 changes: 0 additions & 78 deletions compiler/options.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a1e268e

Please sign in to comment.