Make Optlink not create a .map file

Derek Parnell derek at psych.ward
Tue May 8 14:48:26 PDT 2007


On Tue, 08 May 2007 21:18:19 +0200, torhu wrote:

> Optlink seems to always output a .map file.  From the docs, I can't see 
> any way to avoid this.  Just making it ouput the .map file in the same 
> dir where it outputs the .objs and .exes would help a bit.
> 
> I'm creating a makefile for DM make, so I don't have an easy way to get 
> the filename of the .map file, so I can't easily delete it that way 
> either.  Doing 'del *.map' isn't a great solution.

This is a 'feature' of DMD. As DMD invokes the linker, it controls what the
linker's command line is, and it invokes it in a way that always causes the
.map file to be created. I had to work hard to eliminate this in Bud. In
short, you need to invoke the linker yourself using a response file to pass
it the correct style of command line options. It's all there in the OptLInk
documentation except the part that you need to set the environment symbol
LIB correctly for Phobos just before running the linker.

-- 
Derek Parnell
Melbourne, Australia
"Justice for David Hicks!"
skype: derek.j.parnell


More information about the Digitalmars-d-learn mailing list