FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

different file sizes using build.exe vs. dfl.exe

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Fri Dec 22, 2006 12:17 am    Post subject: different file sizes using build.exe vs. dfl.exe Reply with quote

Greetings!

Will anyone be nice enough and explain to me the reason why using bud creates executable larger than using dfl.exe? For example, I have a project that when I build it with bud it's 530,972 bytes and when I build it with dfl.exe it is 401,948 bytes. How can I get the same size by using bud? By the way, they both work fine, I just don't see why the size difference.

thanks,

josé

PS: I posted this on the bud forum but no one has answered. Maybe I can get an answer here. Smile
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Dec 22, 2006 1:15 am    Post subject: Re: different file sizes using build.exe vs. dfl.exe Reply with quote

Bud/build emitting larger executable file sizes has been known but I'm not exactly sure why it happens. I guess it's because bud/build compiles-in anything and everything that is referenced, even the stuff that's not used from these references. However, the linker should be discarding anything not used.

I personally prefer not to use bud/build.
P.S. dfl.exe now expands wild cards in file names in the snapshot, which should make it less painful to use.
Back to top
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Fri Dec 22, 2006 5:20 am    Post subject: Re: different file sizes using build.exe vs. dfl.exe Reply with quote

jicman wrote:
Greetings!

Will anyone be nice enough and explain to me the reason why using bud creates executable larger than using dfl.exe? For example, I have a project that when I build it with bud it's 530,972 bytes and when I build it with dfl.exe it is 401,948 bytes. How can I get the same size by using bud? By the way, they both work fine, I just don't see why the size difference.

thanks,

josé

PS: I posted this on the bud forum but no one has answered. Maybe I can get an answer here. Smile

I'm sorry. I didn't see it. I normally use the "show new entries" view of the forum and I didn't notice your question come up.

I don't know the answer but in order to find out, one could start by comparing the command lines generated by the different compilation methods.

I suspect its because Bud links a whole lot of Windows libraries even if your program doesn't specifically need them. However I thought the linker would be smart enough to strip off modules not used but maybe its not so clever.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Fri Dec 22, 2006 10:35 am    Post subject: Re: different file sizes using build.exe vs. dfl.exe Reply with quote

Chris Miller wrote:
Bud/build emitting larger executable file sizes has been known but I'm not exactly sure why it happens. I guess it's because bud/build compiles-in anything and everything that is referenced, even the stuff that's not used from these references. However, the linker should be discarding anything not used.


Thanks Chris.

Chris Miller wrote:
I personally prefer not to use bud/build.
P.S. dfl.exe now expands wild cards in file names in the snapshot, which should make it less painful to use.


Yeah, I tried that, but dfl links all the libraries that match the wildcard pattern[somepath\*.d] which is not correct.
Back to top
View user's profile Send private message
jicman



Joined: 22 Dec 2004
Posts: 298
Location: Rochester, NY

PostPosted: Fri Dec 22, 2006 10:50 am    Post subject: Re: different file sizes using build.exe vs. dfl.exe Reply with quote

Derek Parnell wrote:
I'm sorry. I didn't see it. I normally use the "show new entries" view of the forum and I didn't notice your question come up.


No problem, Derek. I knew you were either busy or were not available. I always had great support from you.

Derek Parnell wrote:

I don't know the answer but in order to find out, one could start by comparing the command lines generated by the different compilation methods.


Ok, I'll have a look...

Derek Parnell wrote:

I suspect its because Bud links a whole lot of Windows libraries even if your program doesn't specifically need them. However I thought the linker would be smart enough to strip off modules not used but maybe its not so clever.

ok. One suggestion is, to have a new bud option -dfl, which will pass all info to dfl instead of dmd. Just a thought. That's what I am planning to do, but if you do it, then I don-t have to. Wink

Merry Christmas.

josé
Back to top
View user's profile Send private message
Derek Parnell



Joined: 22 Apr 2004
Posts: 408
Location: Melbourne, Australia

PostPosted: Fri Dec 22, 2006 3:42 pm    Post subject: Re: different file sizes using build.exe vs. dfl.exe Reply with quote

jicman wrote:
One suggestion is, to have a new bud option -dfl, which will pass all info to dfl instead of dmd. Just a thought. That's what I am planning to do, but if you do it, then I don-t have to. Wink

Try using a build.cfg (Bud Configuration file) with the 'compiler' set to dfl.exe and using the -nolink switch. That might work without you having to hack the source code.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group