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

Larry Evans cppljevans at suddenlink.net
Mon Aug 4 16:30:15 PDT 2014


On 08/04/2014 05:55 PM, Hans Wennborg wrote:
> On Mon, Aug 4, 2014 at 2:25 PM, Larry Evans <cppljevans at suddenlink.net> wrote:
>> When I compile with g++ -MMD x.cpp, the x.o is accompanied by and x.d
>> containing the dependencies.
> 
>   clang++ -MMD x.cpp
> 
> should work in the same way. Does that not work for you? Which version
> of Clang are you using, and do you get any error messages?
> 
>  - Hans
> 

Yes, it does now.

I don't know how I missed that.  Maybe because my -o arg was in
a different directory, and I was checking the current directory.

Thanks Hans, and sorry for noise :(

- Larry





More information about the cfe-users mailing list