[Issue 4095] New: compiling with -op -od and using absolute paths for source files make dmd write object files anywhere
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Apr 15 17:53:16 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4095
Summary: compiling with -op -od and using absolute paths for
source files make dmd write object files anywhere
Product: D
Version: 1.057
Platform: Other
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: nfxjfg at gmail.com
--- Comment #0 from nfxjfg at gmail.com 2010-04-15 17:53:13 PDT ---
When passing absolute paths to dmd, compiling with -op and -od will make dmd
write the object file into the same directory as the source file. But it really
should write somewhere inside the directory passed by -od.
Demonstration:
cd /tmp/x/
dmd -op -od/tmp/x/ /tmp/test/foo.d
# dmd creates /tmp/test/foo.o
# it really should crate it somewhere under /tmp/x/
# (maybe /tmp/x/tmp/test/foo.o ?)
This makes -op and -od utterly useless for build scripts or any other advanced
use. Actually, it makes dmd look like dirtying include directories, and you
have to manually clean up them.
What is the point of -od, when dmd decides to write the object files somewhere
else anyway? It doesn't make any sense, thus it must be a bug.
Note that build scripts can not use -od without -op: modules with same name
(but different packages) will map to the same filename. E.g. modules a.foo and
b.foo will both map to foo.o, and dmd will simply overwrite one of these files,
leading to missing symbols in the linker stage.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list