[Issue 12116] New: dmd -op -od broken
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Feb 9 01:36:54 PST 2014
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 at puremagic.com
ReportedBy: timothee.cour2 at gmail.com
--- Comment #0 from Timothee Cour <timothee.cour2 at gmail.com> 2014-02-09 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: -------
More information about the Digitalmars-d-bugs
mailing list