Generate deps file during C compilation
The "genDepend" command was previously taught how to generate a "deps"
file in 4910a87c6 (gendepend improvements; refs #5144). Such a deps file
is useful in integrating the Nim compiler with an external build system
or watch daemon, such that it's possible to only run the Nim compiler
when any of the source files are modified.
It's also useful to generate the deps file in the nimcache directory
during C compilation, without needing to re-run the compilation passes
with "genDepend". This would thus reduce overall project build times.
This commit is contained in:
parent
496716ee9b
commit
1a50442c13
1 changed files with 1 additions and 0 deletions
|
|
@ -77,6 +77,7 @@ proc commandCompileToC(graph: ModuleGraph; cache: IdentCache) =
|
||||||
let proj = changeFileExt(gProjectFull, "")
|
let proj = changeFileExt(gProjectFull, "")
|
||||||
extccomp.callCCompiler(proj)
|
extccomp.callCCompiler(proj)
|
||||||
extccomp.writeJsonBuildInstructions(proj)
|
extccomp.writeJsonBuildInstructions(proj)
|
||||||
|
writeDepsFile(graph, toGeneratedFile(proj, ""))
|
||||||
|
|
||||||
proc commandCompileToJS(graph: ModuleGraph; cache: IdentCache) =
|
proc commandCompileToJS(graph: ModuleGraph; cache: IdentCache) =
|
||||||
#incl(gGlobalOptions, optSafeCode)
|
#incl(gGlobalOptions, optSafeCode)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue