mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-05 11:24:08 +00:00
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:
@@ -77,6 +77,7 @@ proc commandCompileToC(graph: ModuleGraph; cache: IdentCache) =
|
||||
let proj = changeFileExt(gProjectFull, "")
|
||||
extccomp.callCCompiler(proj)
|
||||
extccomp.writeJsonBuildInstructions(proj)
|
||||
writeDepsFile(graph, toGeneratedFile(proj, ""))
|
||||
|
||||
proc commandCompileToJS(graph: ModuleGraph; cache: IdentCache) =
|
||||
#incl(gGlobalOptions, optSafeCode)
|
||||
|
||||
Reference in New Issue
Block a user