diff options
author | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-14 18:34:56 -0500 |
---|---|---|
committer | Ganesh Viswanathan <dev@genotrance.com> | 2018-09-14 18:34:56 -0500 |
commit | 80520eef3cce0b3145dedc71a6652429adb9cc9e (patch) | |
tree | d64725d2749cb82bfef997bbbdb443cc4827de6d /compiler/jsgen.nim | |
parent | e07a256f74b9e89e49287c8a21c1334af43e27c2 (diff) | |
parent | b9dc486db15bb1b4b6f3cef7626733b904d377f7 (diff) | |
download | Nim-80520eef3cce0b3145dedc71a6652429adb9cc9e.tar.gz |
Merge remote-tracking branch 'upstream/devel' into test-6483
Diffstat (limited to 'compiler/jsgen.nim')
-rw-r--r-- | compiler/jsgen.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index dc0db73b4..aa2386526 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -32,7 +32,7 @@ import ast, astalgo, strutils, hashes, trees, platform, magicsys, extccomp, options, nversion, nimsets, msgs, std / sha1, bitsets, idents, types, os, tables, times, ropes, math, passes, ccgutils, wordrecg, renderer, - intsets, cgmeth, lowerings, sighashes, lineinfos, rodutils + intsets, cgmeth, lowerings, sighashes, lineinfos, rodutils, pathutils from modulegraphs import ModuleGraph @@ -2263,7 +2263,7 @@ proc genClass(conf: ConfigRef; obj: PType; content: Rope; ext: string) = "class $#$# {$n$#$n}$n") % [rope(VersionAsString), cls, extends, content] - let outfile = changeFileExt(completeCFilePath(conf, $cls), ext) + let outfile = changeFileExt(completeCFilePath(conf, AbsoluteFile($cls)), ext) discard writeRopeIfNotEqual(result, outfile) proc myClose(graph: ModuleGraph; b: PPassContext, n: PNode): PNode = @@ -2277,11 +2277,11 @@ proc myClose(graph: ModuleGraph; b: PPassContext, n: PNode): PNode = else: "nimsystem" let code = wholeCode(graph, m) let outfile = - if m.config.outFile.len > 0: - if m.config.outFile.isAbsolute: m.config.outFile - else: getCurrentDir() / m.config.outFile + if not m.config.outFile.isEmpty: + if m.config.outFile.string.isAbsolute: m.config.outFile + else: AbsoluteFile(getCurrentDir() / m.config.outFile.string) else: - changeFileExt(completeCFilePath(m.config, f), ext) + changeFileExt(completeCFilePath(m.config, AbsoluteFile f), ext) discard writeRopeIfNotEqual(genHeader() & code, outfile) for obj, content in items(globals.classes): genClass(m.config, obj, content, ext) |