You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-MD Write a depfile containing user and system headers
-MF <file> Write depfile output from -MMD, -MD, -MM, or -M to <file>
-MMD Write a depfile containing user headers
-MM Like -MMD, but also implies -E and writes to stdout by default
gcc -MD, clang -MD, rustc --emit dep-info
possible scenarios:
using zig build-obj, zig build-exe with Make, Ninja
sample usage:
$ zig build-exe -MD a.zig
The text was updated successfully, but these errors were encountered:
I have interest in such a feature as well. I want to clarify that -MD is not, by itself sufficient. What is really needed is -MD -MQ <target name> and (for me) the ability to choose where to write the target, ie -MF <depfile>.d. Note that rustc's --emit dep-infodoes this via--emit dep-info=depfile.d`.
MQ is important, as it causes the output to quote characters that are special to make (since a dep-file is a limited subset of make syntax). My preference would be to take the approach Rust did, and do the right thing and only the right thing, by always quoting, and not having to repeat the output name since rustc (or zig in this case), already knows that the output name is.
I would be willing to work on this, but I'm not sure where to start.
somthing like gcc:
gcc -MD
,clang -MD
,rustc --emit dep-info
possible scenarios:
using
zig build-obj
,zig build-exe
with Make, Ninjasample usage:
The text was updated successfully, but these errors were encountered: