Bug 987 – Add DMD compiler switch to prevent automatic linking to phobos.lib/libphobos.a

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D1 (retired)
Platform
All
OS
All
Creation time
2007-02-19T21:38:00Z
Last change time
2014-02-16T15:23:59Z
Assigned to
bugzilla
Creator
dlang-bugzilla

Comments

Comment #0 by dlang-bugzilla — 2007-02-19T21:38:30Z
Currently, the compiler (dmd.exe) forces to link against the standard library with a fixed name. This greatly stagnates the use of alternating standard libraries, like Tango, which have to resort to replacing the standard "phobos.lib" (or "libphobos.a") file - which makes it difficult to work with both Phobos and Tango projects at the same time. Personally, I consider adding a switch which allows to specify an alternate standard library to link to of very high importance. The current set-up prevents complex build systems, like DSSS, to allow specification of a project's used standard library - and thus facilitate building software and dependencies independently of the currently-configured library. (Currently, your D compiler can either be in Phobos mode or Tango mode, and you have to manually switch between them) - that is, without using OptLink directly, which is very problematic in itself (the interface between DMD and OptLink is ill-defined - library deps change, etc, etc.).
Comment #1 by sean — 2007-02-19T23:50:17Z
For what it's worth, I do think it makes sense for the compiler to implicitly link a library expected to contain its runtime code. In fact, Tango was even designed to support this configuration. It isn't the default simply because it adds complexity but only benefits a small portion of the community. The need for users to switch between configurations is a valid concern however, so I can't say I disagree with this request. If nothing else, it would occasionally be useful to link a debug vs. a release version of the compiler runtime without replacing the library file itself.
Comment #2 by davidl — 2007-09-12T07:52:51Z
From the spec, it's fixed in 1.021
Comment #3 by davidl — 2007-09-12T07:54:57Z
*** Bug 1445 has been marked as a duplicate of this bug. ***