May 17, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Tom S | Tom S wrote:
> To everyone worried about the .obj generation change: ReBuild still provides incremental compilation, as it passes -c to the compiler, which makes it output multiple .obj-s.
The new dmd also does not trace imports for dependencies, nor does it do incremental builds.
|
May 17, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to davidl | davidl wrote: > Added -lib switch to generate library files. Also causes multiple object files to be generated from one source module. <-- what does this exactly mean > > We need more docs on this. http://www.digitalmars.com/d/2.0/dmd-windows.html#library |
May 17, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to John C | John C wrote:
> When an executable is built using two libs built using this method,
> the compiler (or optlink) errors out: Previous Definition Different :
> _D10object.16212__ModuleInfoZ
You're right, that's a bug.
|
May 17, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | Ary Borenszweig wrote:
> I see a lot of "Got rid of some gotos" in the D2 changelog for phobos. Any plans for getting rid of them in DMD front-end? ;-)
No :-)
|
May 17, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ary Borenszweig | Ary Borenszweig wrote:
> Walter, I think I've found a potential bug in DMD 1.030 while porting it to Descent.
>
> Take a look at cast.c, Expression *BinExp::typeCombine(Scope *sc), lines 1371 and 1374:
>
> /* Pick 'tightest' type
> */
> ClassDeclaration *cd1 = tc1->sym->baseClass;
> ClassDeclaration *cd2 = tc1->sym->baseClass;
>
> shouldn't the second line use tc2 instead of tc1?
Yes. Thanks for letting me know about this. I wonder how it passed the test case!
|
May 17, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Sean Kelly wrote:
> Sweet! And I guess this works on both Win32 and Linux?
Yes.
|
May 17, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Sean Kelly | Sean Kelly wrote:
> Oh, I'm not sure if it does this already, but it would be great if DMD used the fully qualified module name instead of the file name for library additions. Or something along those lines anyway. Having to deal with filename collisions while building libraries is an annoying anachronism. I believe with Tango we tell the librarian to use the path name instead of just the file name, but not all librarians support this.
Andrei suggested the same, I just haven't gotten around to it.
|
May 17, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright Attachments: | Walter Bright wrote: > davidl wrote: >> Added -lib switch to generate library files. Also causes multiple object files to be generated from one source module. <-- what does this exactly mean >> >> We need more docs on this. > > http://www.digitalmars.com/d/2.0/dmd-windows.html#library This isn't very clear for people who don't already know how the linker works and what static libraries are. Here's a go at something more complete: When you create an executable (or a shared library), the linker takes all the object files that you specified and glues them together. It also translates all the external references, so that if you use function "foo" in file a.o and this function is defined in file b.o it will modify the code of a.o to point the implementation of "foo". Static libraries are just collections of *optional* additional object files. This means that if you have an object file c.o in a static library and nobody refers to it, then it won't be included in the executable, but if you use one function in c.o, then the *whole* object file is included. The usual way to make object files is that one source file gives one object file. This means that if you want to avoid executable bloat, you need to split your source files so that people can call one function without bringing in a lot of unnecessary functions that just happened to be defined in the same file. What the "-lib" option does is to automagically split the files so that a single source file will generate several small object files instead of a single big one. This way you don't need to split your source code into lots of small files if you don't want to, and your executables won't become unnecessarily big from all those extra functions. Jerome - -- +------------------------- Jerome M. BERGER ---------------------+ | mailto:jeberger@free.fr | ICQ: 238062172 | | http://jeberger.free.fr/ | Jabber: jeberger@jabber.fr | +---------------------------------+------------------------------+ |
May 18, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > http://www.digitalmars.com/d/1.0/changelog.html > http://ftp.digitalmars.com/dmd.1.030.zip > > http://www.digitalmars.com/d/2.0/changelog.html > http://ftp.digitalmars.com/dmd.2.014.zip Any chance we'll be getting a backport of the fix to bug 493 in DMD 1.031? [ http://d.puremagic.com/issues/show_bug.cgi?id=493 ] --bb |
May 19, 2008 Re: DMD 1.030 and 2.014 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Great stuff Walter. Thanks
Walter Bright wrote:
> The library build option has another major coolness feature - before,
> one module compiles to one object file. With library build, one source
> file can compile to multiple object files. This cuts down on
> executable bloat from pulling in object files with irrelevant stuff in
> them.
On question, though. How does DMD decide to split a module in servera .obj files? By class or once a threshold is reached?
|
Copyright © 1999-2021 by the D Language Foundation