Summary: for option -od for relative path the path is added
           Product: D
           Version: 2.036
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: trivial
          Priority: P2
         Component: DMD

--- Comment #0 from hed010gy <> 2009-11-24 04:31:14 PST ---
When I specified a -od, <objpath> , a double level of 2 directories was created
in my current directory, and the object file place theirin, namely
<./objpath/objpath/myobjfile.o, for both linux, dmd, dmd 1.0 and dmd 2.0.

An examination of the mars.c source and module.c source for the string
"global.params.objdir" shows under these conditions the string passed in the
options is concantenated twice.

In mars.c

line 713 if (

    // name as the exe file.

        if (global.params.objdir)
        global.params.objname = 


And in module.c

line 136

if (global.params.objname)
    // objdir must be already combined by here!
    argobj = global.params.objname;


if (!FileName::absolute(argobj))
// objdir is combined again, because already in global.params.objname

    argobj = 

FileName::combine(global.params.objdir, argobj);

I was testing a little XML configuration build tool, and dmd refused to make
just one level of relative directory.

The workaround would seem to be to work out the absolute path and pass that to
the option.

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to