Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
PATCH: CB, compiler flags (new ones and improved handling) and possible crash
oBFusCATed:
--- Quote from: White-Tiger on February 27, 2014, 01:54:22 am ---Anyway.. I'm happy with the way it is now, and I'm not gonna changing it ;)
--- End quote ---
BTW: Statements like this one lead to patches not been accepted ::)
@Alpha: Is it currently possible to make the -flto flag to force the -Ox flags to be passed to linker instead of the compiler or both?
Alpha:
--- Quote from: oBFusCATed on July 12, 2014, 01:50:15 pm ---@Alpha: Is it currently possible to make the -flto flag to force the -Ox flags to be passed to linker instead of the compiler or both?
--- End quote ---
This cannot be done with the current implementation. Do you have any recommendations of how such an option could be specified in the XML (or elsewhere)?
@White-Tiger: It appears you did some interesting things here, though I do not recall if I had seen it before. ... Patches in a patch tracker are easier to not accidentally lose.
@devs: On SF, can we set up sub-pages for the tickets so actual patches do not get mixed with bug reports?
oBFusCATed:
--- Quote from: Alpha on July 12, 2014, 08:30:29 pm ---This cannot be done with the current implementation. Do you have any recommendations of how such an option could be specified in the XML (or elsewhere)?
--- End quote ---
Probably we can have something like a group that marks optimization flags and the -flto flag has attribute that says that groupX should be passed to the compiler.
The interesting question here is: does only -Ox flags need to be passed to the linker or do we have to pass any other code generation flags?
darmar:
I came to this topic when I tried to understand, what compiler options " [-O1] ", " [-O2] ", " [-O3] " are for.
I think, that the current implementation is unclear for the users (and me). I would suggest to add some text to those options. Something like:
name = "Send -O1 option to the linker".
With such description user can better understand the meaning of these options.
White-Tiger:
yeah.. it's a bit broken right now... Code::Blocks sorts all flags alphabetical now... that's why they're totally out of place.
It's probably a good idea to either find a proper way to handle LTO, or add them like this:
* Link-Time-Optimization (aggressive)[-flto -O3]
* Link-Time-Optimization (medium)[-flto -O2]
* Link-Time-Optimization (simple)[-flto -O1]So that removes the single option (-flto) since it's always included (which makes kinda sense actually)
But that would brake my local build... since I've got this option in addition:
--- Code: ---Link-Time-Optimization (7 threads) [-flto=7]
--- End code ---
Unless it's ok to have this on the command line: -flto -O1 -flto=7
P.S. I'm not fully sure about the naming.. but maybe we should find a short way to nickname O1 to O3... and O1 is generally safe to apply, while O2 and O3 can cause programs to crash (if their source is buggy etc.)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version