c3c
c3c copied to clipboard
Cmdline argument feature to list all files used for compilation
Proposal Given a file C:/path/to/test.c3:
import std::io;
fn int main(char[][] argv) {
io::println("Hello World!");
return 0;
}
Calling 'c3c compile test.c3 --print-input' will yield the following output:
# input-files-begin
C:/path/to/test.c3
C:/path/to/std/io.c3
...
# input-files-end
And so forth, in the same style as the --print-output command. So all input files specified on the cmdline, all imported module files, all $include'd files, etc.
Relevance This is useful for external build systems, so they know they should rebuild when a file changes.
Would it be fine to return it as json?
Yes, sure!
This is now in 0.5.6