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

Is -O... optimize flag to GDC possible? If so, how?

 
Post new topic   Reply to topic     Forum Index -> Build
View previous topic :: View next topic  
Author Message
rhundt



Joined: 27 Apr 2007
Posts: 2

PostPosted: Fri Apr 27, 2007 11:44 am    Post subject: Is -O... optimize flag to GDC possible? If so, how? Reply with quote

Hi, I'm struggling to believe that there is no apparent way of passing through an optimize flag to the GDC compiler?

I've tried ./bud file.d -O3, I've tried in a build.cfg using CMDLINE... and I know my code isn't being optimized because it runs 5x faster when I do it by hand with: gdc -O3

Somebody please tell me I'm wrong... and then if you'd be so kind, please tell me how.
Back to top
View user's profile Send private message
Derek Parnell



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

PostPosted: Sun Apr 29, 2007 7:45 pm    Post subject: Re: Is -O... optimize flag to GDC possible? If so, how? Reply with quote

rhundt wrote:
Hi, I'm struggling to believe that there is no apparent way of passing through an optimize flag to the GDC compiler?

I've tried ./bud file.d -O3, I've tried in a build.cfg using CMDLINE... and I know my code isn't being optimized because it runs 5x faster when I do it by hand with: gdc -O3

Somebody please tell me I'm wrong... and then if you'd be so kind, please tell me how.

I don't have GDC but Bud will pass through to the compiler any switches that it doesn't use itself. Thus the "-O3" will be passed to GDC.

Use the "-test" switch to see what is passed to the commandline without executing it.

If you can, create a 'debug' version of Bud by compiling it with the -version=BuildVerbose switch then run Bud with the -V switch to get a verbose output. That will show you more about what is actually happening.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
rhundt



Joined: 27 Apr 2007
Posts: 2

PostPosted: Mon Apr 30, 2007 8:40 am    Post subject: Reply with quote

Thanks Derek,

The -fversion=BuildVerbose thing did the trick, I'd tried with -V before, but, of course it had no effect... perhaps the usage listing should mention that the -V flags don't work with the default build... or perhaps enable the flag by default.

Anyway, I ended up being able to configure bud to use gdmd as compiler and gdc as linker, so I can pass -inline and -O to gdmd.

Thanks again.
Back to top
View user's profile Send private message
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Mon Apr 30, 2007 5:57 pm    Post subject: Re: Is -O... optimize flag to GDC possible? If so, how? Reply with quote

Derek Parnell wrote:

I don't have GDC


i may be repeating myself, but i really think GDC support is a must for bud! on my ubuntu linux it was just a matter of downloading the package and copying its content to /usr and voila it works... the are also double-clickable installers on gdcgnu.sf.net
Back to top
View user's profile Send private message
Derek Parnell



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

PostPosted: Mon Apr 30, 2007 6:22 pm    Post subject: Re: Is -O... optimize flag to GDC possible? If so, how? Reply with quote

Auria wrote:
Derek Parnell wrote:

I don't have GDC


i may be repeating myself, but i really think GDC support is a must for bud! on my ubuntu linux it was just a matter of downloading the package and copying its content to /usr and voila it works... the are also double-clickable installers on gdcgnu.sf.net

Linux doesn't support my ethernet hardware (that's what I get for using just released mother boards <G>)

I will have to download it using Windows, transfer it to a CD and copy it from that I suppose ... oh well I guess I have to do it some time.
_________________
--
Derek
skype name: derek.j.parnell
Back to top
View user's profile Send private message
Auria



Joined: 29 May 2006
Posts: 44

PostPosted: Wed May 02, 2007 11:39 am    Post subject: Re: Is -O... optimize flag to GDC possible? If so, how? Reply with quote

Derek Parnell wrote:

Linux doesn't support my ethernet hardware (that's what I get for using just released mother boards <G>)

Ok i understand... linux and hardware support is a long history Sad
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Build 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