summary refs log tree commit diff stats
path: root/compiler/semdata.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-05-13 17:52:21 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-05-13 17:52:21 +0200
commit328e7a100560e5bd179512ba142ef944bf0a0698 (patch)
tree2403385aa6fc3461a810ca34222af8e3794b79cf /compiler/semdata.nim
parent297038f70424e2d777cf7c308a9ab48cb6f66d01 (diff)
downloadNim-328e7a100560e5bd179512ba142ef944bf0a0698.tar.gz
options.nim: no global variables anymore
Diffstat (limited to 'compiler/semdata.nim')
-rw-r--r--compiler/semdata.nim5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/semdata.nim b/compiler/semdata.nim
index 6f7a48dae..ad5bdfd49 100644
--- a/compiler/semdata.nim
+++ b/compiler/semdata.nim
@@ -204,7 +204,7 @@ proc considerGenSyms*(c: PContext; n: PNode) =
 
 proc newOptionEntry*(conf: ConfigRef): POptionEntry =
   new(result)
-  result.options = gOptions
+  result.options = conf.options
   result.defaultCC = ccDefault
   result.dynlib = nil
   result.notes = conf.notes
@@ -286,7 +286,8 @@ proc makeTypeDesc*(c: PContext, typ: PType): PType =
 
 proc makeTypeSymNode*(c: PContext, typ: PType, info: TLineInfo): PNode =
   let typedesc = makeTypeDesc(c, typ)
-  let sym = newSym(skType, c.cache.idAnon, getCurrOwner(c), info).linkTo(typedesc)
+  let sym = newSym(skType, c.cache.idAnon, getCurrOwner(c), info,
+                   c.config.options).linkTo(typedesc)
   return newSymNode(sym, info)
 
 proc makeTypeFromExpr*(c: PContext, n: PNode): PType =