[cfe-users] What clang option is equivalent to gcc -c -MMD x.cpp?

Larry Evans cppljevans at suddenlink.net
Mon Aug 4 14:25:45 PDT 2014


When I compile with g++ -MMD x.cpp, the x.o is accompanied by and x.d
containing the dependencies.

Does clang have a flag to enable this?  I did try passing -MMD and,
base on the output of `clang --help` I did try -Xpreprocessor MMD;
however, neither worked.

TIA.

-regards,
Larry




More information about the cfe-users mailing list