View previous topic :: View next topic |
Author |
Message |
rhundt
Joined: 27 Apr 2007 Posts: 2
|
Posted: Fri Apr 27, 2007 11:44 am Post subject: Is -O... optimize flag to GDC possible? If so, how? |
|
|
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 |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Sun Apr 29, 2007 7:45 pm Post subject: Re: Is -O... optimize flag to GDC possible? If so, how? |
|
|
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 |
|
|
rhundt
Joined: 27 Apr 2007 Posts: 2
|
Posted: Mon Apr 30, 2007 8:40 am Post subject: |
|
|
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 |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Mon Apr 30, 2007 5:57 pm Post subject: Re: Is -O... optimize flag to GDC possible? If so, how? |
|
|
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 |
|
|
Derek Parnell
Joined: 22 Apr 2004 Posts: 408 Location: Melbourne, Australia
|
Posted: Mon Apr 30, 2007 6:22 pm Post subject: Re: Is -O... optimize flag to GDC possible? If so, how? |
|
|
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 |
|
|
Auria
Joined: 29 May 2006 Posts: 44
|
Posted: Wed May 02, 2007 11:39 am Post subject: Re: Is -O... optimize flag to GDC possible? If so, how? |
|
|
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 |
|
Back to top |
|
|
|