koch/nim: completion of the 'better run' feature
This commit is contained in:
parent
13253f4154
commit
6d125da93f
3 changed files with 6 additions and 4 deletions
|
|
@ -1023,7 +1023,7 @@ proc writeJsonBuildInstructions*(conf: ConfigRef) =
|
||||||
lit "],\L\"linkcmd\": "
|
lit "],\L\"linkcmd\": "
|
||||||
str getLinkCmd(conf, conf.absOutFile, objfiles)
|
str getLinkCmd(conf, conf.absOutFile, objfiles)
|
||||||
|
|
||||||
if optRun in conf.globalOptions:
|
if optRun in conf.globalOptions or isDefined(conf, "nimBetterRun"):
|
||||||
lit ",\L\"nimfiles\":[\L"
|
lit ",\L\"nimfiles\":[\L"
|
||||||
nimfiles(conf, f)
|
nimfiles(conf, f)
|
||||||
lit "]\L"
|
lit "]\L"
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,7 @@ proc commandCompileToC(graph: ModuleGraph) =
|
||||||
semanticPasses(graph)
|
semanticPasses(graph)
|
||||||
registerPass(graph, cgenPass)
|
registerPass(graph, cgenPass)
|
||||||
|
|
||||||
if {optRun, optForceFullMake} * conf.globalOptions == {optRun}:
|
if {optRun, optForceFullMake} * conf.globalOptions == {optRun} or isDefined(conf, "nimBetterRun"):
|
||||||
let proj = changeFileExt(conf.projectFull, "")
|
let proj = changeFileExt(conf.projectFull, "")
|
||||||
if not changeDetectedViaJsonBuildInstructions(conf, proj):
|
if not changeDetectedViaJsonBuildInstructions(conf, proj):
|
||||||
# nothing changed
|
# nothing changed
|
||||||
|
|
|
||||||
6
koch.nim
6
koch.nim
|
|
@ -443,10 +443,12 @@ proc temp(args: string) =
|
||||||
var finalDest = d / "bin" / "nim_temp".exe
|
var finalDest = d / "bin" / "nim_temp".exe
|
||||||
# 125 is the magic number to tell git bisect to skip the current commit.
|
# 125 is the magic number to tell git bisect to skip the current commit.
|
||||||
var (bootArgs, programArgs) = splitArgs(args)
|
var (bootArgs, programArgs) = splitArgs(args)
|
||||||
if "doc" notin programArgs and "threads" notin programArgs and "js" notin programArgs:
|
if "doc" notin programArgs and
|
||||||
|
"threads" notin programArgs and
|
||||||
|
"js" notin programArgs:
|
||||||
bootArgs.add " -d:leanCompiler"
|
bootArgs.add " -d:leanCompiler"
|
||||||
let nimexec = findNim()
|
let nimexec = findNim()
|
||||||
exec(nimexec & " c -d:debug --debugger:native " & bootArgs & " " & (d / "compiler" / "nim"), 125)
|
exec(nimexec & " c -d:debug --debugger:native -d:nimBetterRun " & bootArgs & " " & (d / "compiler" / "nim"), 125)
|
||||||
copyExe(output, finalDest)
|
copyExe(output, finalDest)
|
||||||
setCurrentDir(origDir)
|
setCurrentDir(origDir)
|
||||||
if programArgs.len > 0: exec(finalDest & " " & programArgs)
|
if programArgs.len > 0: exec(finalDest & " " & programArgs)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue