May 17, 2008
在 Sat, 17 May 2008 14:29:49 +0800,Walter Bright <newshound1@digitalmars.com> 写道:

> These contain a new way of building that I've wanted to do for a long time. dmd can now build libraries directly, without writing out object files or invoking the librarian. This accelerates library builds by a whopping factor of 3! Besides, it doesn't litter your directories with pointless object files.
>
> 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.
>
> Another build improvement is when multiple modules are compiled at the same time to build an executable, only one object file is created with the generated code for all modules combined into it. This speeds linking, and also eliminates pointless file detritus.
>
> No, having dmd incorporate the linking is probably not going to happen :-(. Librarians are so simple, though, that this is a big win.
>
> Yes, both 1.0 and 2.0 dmd's get this (it doesn't affect the language).
>
> Another cool new feature is the dmd -man switch. Try it out! Lots of new library stuff, bugfixes, and Andrei has completely redone rdmd.
>
> 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

Thanks for the hard working. Downloading now!
I wish we can preview some stuff/ new features visually on the website on the update release.

-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
May 17, 2008
Thanks, Walter!

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.

-- 
Tomasz Stachowiak
http://h3.team0xf.com/
h3/h3r3tic on #D freenode
May 17, 2008
在 Sat, 17 May 2008 14:29:49 +0800,Walter Bright <newshound1@digitalmars.com> 写道:

> These contain a new way of building that I've wanted to do for a long time. dmd can now build libraries directly, without writing out object files or invoking the librarian. This accelerates library builds by a whopping factor of 3! Besides, it doesn't litter your directories with pointless object files.
>
> 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.
>
> Another build improvement is when multiple modules are compiled at the same time to build an executable, only one object file is created with the generated code for all modules combined into it. This speeds linking, and also eliminates pointless file detritus.
>
> No, having dmd incorporate the linking is probably not going to happen :-(. Librarians are so simple, though, that this is a big win.
>
> Yes, both 1.0 and 2.0 dmd's get this (it doesn't affect the language).
>
> Another cool new feature is the dmd -man switch. Try it out! Lots of new library stuff, bugfixes, and Andrei has completely redone rdmd.
>
> 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

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.

-- 
使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/
May 17, 2008
Walter Bright Wrote:

> These contain a new way of building that I've wanted to do for a long time. dmd can now build libraries directly, without writing out object files or invoking the librarian. This accelerates library builds by a whopping factor of 3! Besides, it doesn't litter your directories with pointless object files.

When an executable is built using two libs built using this method, the compiler (or optlink) errors out: Previous Definition Different : _D10object.16212__ModuleInfoZ
May 17, 2008
Great!

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? ;-)

How does rdmd compares to other build tools like bud or dsss?

(I guess my "dream" is to release a Descent version that matches the latest versions of DMD... it's always about catching up...)
May 17, 2008
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?

(Eclipse pointed me out that tc2 wasn't used... ;-)
May 17, 2008
Walter Bright wrote:
> These contain a new way of building that I've wanted to do for a long time. dmd can now build libraries directly, without writing out object files or invoking the librarian. This accelerates library builds by a whopping factor of 3! Besides, it doesn't litter your directories with pointless object files.

Sweet!  And I guess this works on both Win32 and Linux?


Sean
May 17, 2008
Walter Bright wrote:
> These contain a new way of building that I've wanted to do for a long time. dmd can now build libraries directly, without writing out object files or invoking the librarian. This accelerates library builds by a whopping factor of 3! Besides, it doesn't litter your directories with pointless object files.

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.


Sean
May 17, 2008
davidl wrote:
> 在 Sat, 17 May 2008 14:29:49 +0800,Walter Bright <newshound1@digitalmars.com> 写道:
> 
>> These contain a new way of building that I've wanted to do for a long time. dmd can now build libraries directly, without writing out object files or invoking the librarian. This accelerates library builds by a whopping factor of 3! Besides, it doesn't litter your directories with pointless object files.
>>
>> 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.
>>
>> Another build improvement is when multiple modules are compiled at the same time to build an executable, only one object file is created with the generated code for all modules combined into it. This speeds linking, and also eliminates pointless file detritus.
>>
>> No, having dmd incorporate the linking is probably not going to happen :-(. Librarians are so simple, though, that this is a big win.
>>
>> Yes, both 1.0 and 2.0 dmd's get this (it doesn't affect the language).
>>
>> Another cool new feature is the dmd -man switch. Try it out! Lots of new library stuff, bugfixes, and Andrei has completely redone rdmd.
>>
>> 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
> 
> 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.
> 
> --使用 Opera 革命性的电子邮件客户程序: http://www.opera.com/mail/

Agreed.  While I can download and futz around with this myself, I'd like to know ahead of time what I'm getting into.  Does anyone have a practical example?

- Pragma
May 17, 2008
Walter Bright wrote:
> These contain a new way of building that I've wanted to do for a long time. dmd can now build libraries directly, without writing out object files or invoking the librarian. This accelerates library builds by a whopping factor of 3! Besides, it doesn't litter your directories with pointless object files.
> 
> 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.
> 
> Another build improvement is when multiple modules are compiled at the same time to build an executable, only one object file is created with the generated code for all modules combined into it. This speeds linking, and also eliminates pointless file detritus.
> 
> No, having dmd incorporate the linking is probably not going to happen :-(. Librarians are so simple, though, that this is a big win.
> 
> Yes, both 1.0 and 2.0 dmd's get this (it doesn't affect the language).
> 
> Another cool new feature is the dmd -man switch. Try it out! Lots of new library stuff, bugfixes, and Andrei has completely redone rdmd.
> 
> 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

Looks like seriously cool stuff Walter.  Thanks for the hard work and the bug patches, as always.

- Pragma