www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Phobos' Windows Makefile

reply Eduard Staniloiu <edi33416 gmail.com> writes:
Hello,

I've hit the following problem on this PR [0]:
The Windows 32bit build fails with the error: "more than 32767 
symbols in object file" [1].

After taking a look in `win32.mak`, I've seen that we are 
bundling multiple source files into a single object (which is the 
issue here), instead of compiling each source file into it's 
corresponding object and then linking the objects together.
Is there a reason behind doing so, or should we rewrite the 
Windows makefiles?

Looking forward to your answers! :)
Cheers,
Eduard

[0] - https://github.com/dlang/phobos/pull/5331
[1] - 
https://auto-tester.puremagic.com/show-run.ghtml?projectid=1&runid=2826646&isPull=true
Oct 11
parent reply Jacob Carlborg <doob me.com> writes:
On 2017-10-11 21:57, Eduard Staniloiu wrote:
 Hello,
 
 I've hit the following problem on this PR [0]:
 The Windows 32bit build fails with the error: "more than 32767 symbols 
 in object file" [1].
 
 After taking a look in `win32.mak`, I've seen that we are bundling 
 multiple source files into a single object (which is the issue here), 
 instead of compiling each source file into it's corresponding object and 
 then linking the objects together.
 Is there a reason behind doing so, or should we rewrite the Windows 
 makefiles?
It's faster to compile when passing multiple files to the compiler at once. It doesn't have to run the compiler on the same files over and over again. -- /Jacob Carlborg
Oct 12
parent reply Eduard Staniloiu <edi33416 gmail.com> writes:
On Thursday, 12 October 2017 at 07:17:15 UTC, Jacob Carlborg 
wrote:
 On 2017-10-11 21:57, Eduard Staniloiu wrote:
 Hello,
 
 I've hit the following problem on this PR [0]:
 The Windows 32bit build fails with the error: "more than 32767 
 symbols in object file" [1].
 
 After taking a look in `win32.mak`, I've seen that we are 
 bundling multiple source files into a single object (which is 
 the issue here), instead of compiling each source file into 
 it's corresponding object and then linking the objects 
 together.
 Is there a reason behind doing so, or should we rewrite the 
 Windows makefiles?
It's faster to compile when passing multiple files to the compiler at once. It doesn't have to run the compiler on the same files over and over again.
I'm not convinced it's faster, as making a change in one of the bundled files will cause all the files in the object bundle to get recompiled, instead of compiling only the changed file and linking the objects.
Oct 12
parent Jacob Carlborg <doob me.com> writes:
On 2017-10-12 13:51, Eduard Staniloiu wrote:

 I'm not convinced it's faster, as making a change in one of the bundled 
 files will cause all the files in the object bundle to get recompiled, 
 instead of compiling only the changed file and linking the objects.
This is for full builds. And since DMD is so fast, it's very easy to just throw all the source files at once at the compiler. -- /Jacob Carlborg
Oct 12