www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 12116] New: dmd -op -od broken

reply d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12116

           Summary: dmd -op -od broken
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: timothee.cour2 gmail.com



01:36:51 PST ---
dmd -c -op -odbuild ../d01/fun.d
#will create  ./build, and write to ./d01/fun.o instead of ./build/d01/fun.o

dmd -c -op -odbuild /abspath/to/fun.d
#will not create ./build and not write any .o file, and not report any error
either

Without -op (flat hierarchy), dmd will also produce wrong results:
dmd -c fun.d util/fun.d 
#oops, fun.o overwritten 

ldc has a better way to handle the object flattening:
here, it'll create:
fun.o
util.fun.o
with no ambiguity (since '.' is not a valid character in a module anyways,
unlike '_', which was previously proposed).

We should have a flag to support the 'ldc' way.
translate paths a/b/c containing module foo.bar to:
build/a.b.c.o (choice 1, based on path given as input) or build/foo.bar.o
(based on module name)
For choice 1, we need to worry about the case of input files given as
'../foo/bar.d' but one way that would always work would be to 1st convert to
absolute paths every input file.

Note, this is a blocker for incremental compilation in '1 pass' (ie where we
don't compile each object file at a time but all in 1 go).

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 09 2014
parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12116


Andrej Mitrovic <andrej.mitrovich gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |andrej.mitrovich gmail.com



04:57:23 PST ---
Related or dupe of: http://d.puremagic.com/issues/show_bug.cgi?id=3541

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Feb 10 2014