digitalmars.D.learn - Why is "phobos" hardcoded in DMD
- Derek Parnell (9/9) Apr 17 2007 Hi Walter,
- Alexander Panek (6/12) Apr 17 2007 Please put that on your TODO list.. doesn't have to be on the top, but
- Serg Kovrov (7/12) Apr 17 2007 This is exactly question I ask when read an install note on Ares at a
- BCS (3/16) Apr 17 2007 How about put that setting in the dmd.conf file and put sections in it s...
- Brad Anderson (3/9) Apr 17 2007 ooooh, please do this, Walter!
- Dave (3/14) Apr 17 2007 I would love to have this command-line controlled, as well as configurab...
- Derek Parnell (18/22) Apr 17 2007 Maybe I haven't been clear enough. My question above is a sincere one an...
- Justin C Calvarese (24/42) Apr 17 2007 Only Walter knows the answer to this, but I'll offer a guess.
- Dejan Lekic (3/3) Apr 17 2007 There should be compiler switch not to link against either Phobos or Tan...
Hi Walter, what is the rationale for having "phobos" hardcoded in DMD? Would there be much work to free this up to make it a configuration item instead? -- Derek Parnell Melbourne, Australia "Justice for David Hicks!" skype: derek.j.parnell
Apr 17 2007
Derek Parnell wrote:Hi Walter, what is the rationale for having "phobos" hardcoded in DMD? Would there be much work to free this up to make it a configuration item instead?Please put that on your TODO list.. doesn't have to be on the top, but it would be really great. Especially for Phobos & Tango interoperability, and things like OS development.. always having to link in a libphobos.a is a bit of a pain in the ass sometimes, especially in this case.
Apr 17 2007
Derek Parnell wrote:Hi Walter, what is the rationale for having "phobos" hardcoded in DMD? Would there be much work to free this up to make it a configuration item instead?This is exactly question I ask when read an install note on Ares at a time. People are hesitant to even try Tango because of it. I think there should be a compiler switch for not to link against Phobos implicitly. -- serg.
Apr 17 2007
Reply to Serg,Derek Parnell wrote:How about put that setting in the dmd.conf file and put sections in it so that one lib or another can be picked just by changing a command line switch.Hi Walter, what is the rationale for having "phobos" hardcoded in DMD? Would there be much work to free this up to make it a configuration item instead?This is exactly question I ask when read an install note on Ares at a time. People are hesitant to even try Tango because of it. I think there should be a compiler switch for not to link against Phobos implicitly.
Apr 17 2007
Derek Parnell wrote:Hi Walter, what is the rationale for having "phobos" hardcoded in DMD? Would there be much work to free this up to make it a configuration item instead?ooooh, please do this, Walter! BA
Apr 17 2007
Brad Anderson wrote:Derek Parnell wrote:I would love to have this command-line controlled, as well as configurable in dmd.conf and sc.ini. I wish both Tango and Phobos could be bundled together w/ the DM supplied compiler download as well.Hi Walter, what is the rationale for having "phobos" hardcoded in DMD? Would there be much work to free this up to make it a configuration item instead?ooooh, please do this, Walter! BA
Apr 17 2007
On Wed, 18 Apr 2007 07:31:32 +1000, Derek Parnell wrote:Hi Walter, what is the rationale for having "phobos" hardcoded in DMD?Maybe I haven't been clear enough. My question above is a sincere one and not rhetorical. I believe that it is possible that there is a very good reason for having Phobos hard coded, it's just that I don't know what that might be and I would like to find out.Would there be much work to free this up to make it a configuration item instead?By "configuration item", I am not trying to imply any specific implementation. Rather I'm just expressing a desire that Walter allows something external to DMD, but controllable by the developer, to be used to inform the linker what should be the /default/ library to link against. I suppose if none is supplied by the developer to DMD that DMD could use "phobos" as its in-built default name. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Justice for David Hicks!" 18/04/2007 12:14:44 PM
Apr 17 2007
Derek Parnell wrote:On Wed, 18 Apr 2007 07:31:32 +1000, Derek Parnell wrote:Only Walter knows the answer to this, but I'll offer a guess. I suspect the reason that it's hardcoded is because it'd be next to impossible (if not impossible) to write a D program that doesn't require something stored in phobos.lib. In particular, the garbage collector is in there. The standard lib also contains the object prototype and the code required to sort an array. Since you would need an object to work with exceptions, the program that doesn't need something from the standard lib is going to be very stripped down. Of course, they've made Tango work without Phobos by studying which parts of Phobos are required to be in the standard library by the language and put something similar in Tango. It would be nice if we could use some sort of command line line switch to specify to use another lib than phobos.lib so that Tango and Phobos could coexist more easily. Programs would still be unable to use Tango and Phobos at the same time (at least until Gregor Richards released "tangobos"), but a "alternative standard lib" switch could still come in handy.Hi Walter, what is the rationale for having "phobos" hardcoded in DMD?Maybe I haven't been clear enough. My question above is a sincere one and not rhetorical. I believe that it is possible that there is a very good reason for having Phobos hard coded, it's just that I don't know what that might be and I would like to find out.I don't see why this wouldn't be possible. I'll bet that someone familiar with the DMD front end could figure out how hard (hopefully it'd be easy) this would be. (But looking at the DMD front end isn't one of my talents.) -- jcc7Would there be much work to free this up to make it a configuration item instead?By "configuration item", I am not trying to imply any specific implementation. Rather I'm just expressing a desire that Walter allows something external to DMD, but controllable by the developer, to be used to inform the linker what should be the /default/ library to link against. I suppose if none is supplied by the developer to DMD that DMD could use "phobos" as its in-built default name.
Apr 17 2007
There should be compiler switch not to link against either Phobos or Tango, IMHO. - This would encourage people to try to make some low-level libraries themselves... It should be something like --nostdlib in GCC, and/or --nocrt later (to totaly avoid linking against libc). Regards
Apr 17 2007