Developer forums (C::B DEVELOPMENT STRICTLY!) > Development
PATCH: CB, compiler flags (new ones and improved handling) and possible crash
oBFusCATed:
The original hack is to blame. The flag system must be improved to support drop downs/comboboxes. We're using wxpropgrid control which supports this, so it shouldn't be that hard to implement.
White-Tiger: Why your build will be broken? I didn't understand your comment.
White-Tiger:
The issue with LTO is that it has at least 2 "independent" flags to configure...
The optimization level from 1 to 3 and the number of threads.
Though we might also just drop the optimization level from the linking step... (at least in the meantime to not confuse users)
“If you do not specify an optimization level option -O at link time, then GCC uses the highest optimization level used when compiling the object files.”
oBFusCATed:
This is something new. Older GCCs (4.7, 4.8) used the lowest/no optimisation level.
I don't know why we have these options in the first place. They are in the wrong place and they are only for advanced users.
White-Tiger:
Actually.. they're not "in the wrong place"...
You might be somewhat right to say they're linker options. But moving them outside the compiler dialog is still wrong.
1) the linker is part of the compilation process and part of the compiler
2) LTO options need to be send to BOTH the linker, and compiler. Except for the optimization options.. but having "LTO" on the compiler window, and LTO's optimization options on the linker window, would only confuse users... not to mention that people likely look for optimization options in the compiler tab.
3) a lot of other options are actually linker options already.. or at least also set options for the linker (which is still part of the compilation process. No one says they're linking a program... they compile it from source.)
P.S. the options went in because my entire patch got applied... and they used to work that time ;)
It's bad to deny a feature just because it isn't "perfect" yet, better be able to make use of it than not at all.
P.P.S. I'm not really agreeing that it's for advanced users only... LTO got a lot of benefits and should be "default" for optimized builds. You wouldn't say that non-LTO -O is for advanced users only, would you?
darmar:
--- Quote from: White-Tiger on April 18, 2017, 06:55:58 pm ---Though we might also just drop the optimization level from the linking step... (at least in the meantime to not confuse users)
“If you do not specify an optimization level option -O at link time, then GCC uses the highest optimization level used when compiling the object files.”
--- End quote ---
I think, removing "-O1" etc. options is the reasonable solution. Options like "-flto=7" advanced users can add in the "Other linker options" field.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version