exe file size

Robert Fraser fraserofthenight at gmail.com
Sat Nov 29 21:02:57 PST 2008


John Reimer wrote:
> Hello Bill,
> 
>> On Sun, Nov 16, 2008 at 6:01 PM, TomD <t_demmer at nospam.web.de> wrote:
>>
>>> John Reimer Wrote:
>>> [...]
>>>> Thanks for the example.  I've avoided makefiles in the past because,
>>>> despite
>>>> their power and flexibility, they are too complicated for what
>>>> amounts to
>>>> a fairly simple task in most cases.  Granted, once they are created
>>>> for a
>>>> project, there shouldn't be much need to fiddle with them more.
>>>> Anyway, I'll keep your sample above in mind if I go this route.
>>>> Thanks. :)
>>>>
>>>> -JJR
>>>>
>>> What I have learned this weekend is "don't try to be smart when brute
>>> force
>>> is just enough".
>>> The following script is the fastest way to rebuild dwt on linux:
>>> -----
>>> #!/bin/bash
>>> DMD=/opt/dmd/bin/dmd
>>> DMDFLAGS="-debuglib=tango-base-dmd -defaultlib=tango-base-dmd"
>>> DMDFLAGS=$DMDFLAGS" -I/opt/dmd/import"
>>> DMDFLAGS=$DMDFLAGS" -version=Tango -version=Posix -L-tango-user-dmd"
>>> DMDFLAGS=$DMDFLAGS" -O -release"
>>> WBD=`pwd`
>>> DMDFLAGS="-I$WBD $DMDFLAGS"
>>> echo "Compile command:"
>>> echo $DMD $DMDFLAGS -c -op
>>> find dwt -iname \*.d | xargs $DMD $DMDFLAGS -c -op
>>> echo "done compiling, build libdwt.a"
>>> find dwt -name \*.o | xargs ar -svr libdwt.a
>>> ----
>>> That takes 27s on my Laptop. I used to do the same directorywise,
>>> that takes about 1m15s. Looks like the best strategy for a build
>>> tool is to first grab the names of the files to recompile and then
>>> give it to one instance of dmd to compile all of them at once.
>>> Unfortunately,
>>> the -v switch  does not help when invoking dmd like this.
>> This agrees with the conventional wisdom for using dsss, which is to
>> turn the oneatatime option to off.  I believe that causes dmd to be
>> called once with all the dependent files as args.
>>
>> --bb
>>
> 
> 
> An update: 
> I'm back to using dsss successfully with acceptable build times.   I 
> followed a setup similar to Frank's and managed to install dsss 0.75 
> correctly such that it builds a dwt-based project in approximately 38 
> seconds (with -gc flag active).  For debug/test builds, I avoid building 
> the dwt library itself and simply reference the dwt directory as a 
> source library while compiling the test project.  With a slight 
> adjustment to the etc/rebuild/dmd-tango-posix config file, I'm now 
> content with the ease of building sample projects via dsss.
> 
> Incidentally, I was originally doing all this on a linux distribution 
> installed in a virtual machine (VirtualBox originally, then Vmware) 
> which probably slowed the build times further.  I have since moved to 
> using colinux under Windows XP which has proved to be a delight to work 
> under.  For those interested, there are a couple of linux distribution 
> projects that use colinux as there base.  It basically allows you to run 
> linux and linux programs full speed as a win32 service.  X windows 
> programs can run seemlessly with win32 apps by using XMing which is 
> installed as part of the package.  The apps run very fast since they are 
> not being run inside a virtual machine!
> 
> Here's the link to just one of the colinux distribtuions (based on 
> Ubuntu, the one I am currently using):
> 
> http://www.andlinux.org/
> 
> And here's a link that list a few other options:
> 
> http://colinux.wikia.com/wiki/Installation_out_of_the_box
> 
> You should still have a fair bit of RAM to run coLinux.  I've got 1 GB 
> on my laptop, but 2+ GB probably would be better.
> 
> -JJR

Thanks for introducing me to coLinux! Sadly, no 64-bit support yet, 
otherwise I would be installing it as I write this. That's a very 
awesome project.



More information about the Digitalmars-d mailing list