Uh oh!
There was an error while loading. Please reload this page.
cmake: optimization levels - #2054
Conversation
@lbetlej@lgirdwood |
paulstelian97
left a comment
There was a problem hiding this comment.
Minor nit: What happens if someone pulls this and tries to build without updating the config? (having none of the choices selected). Would the build succeed (with no optimization) or would a make oldconfig or something be required?
Otherwise I understand the motivation behind this. Approved.
jajanusz
commented
Nov 5, 2019
@paulstelian97 It would have no -O flag at all in this case (I'm not sure if it's -O0 or -O2 then, depends on compiler i guess), It may be better to add catch in CMake file for that, thanks |
jajanusz
commented
Nov 5, 2019
I need to add some smart checks for Kconfig and CMake dependencies to prevent undefined behaviour when new configs are introduced. |
lgirdwood
left a comment
There was a problem hiding this comment.
This will be useful for debug too.
Uh oh!
There was an error while loading. Please reload this page.
xiulipan
commented
Nov 6, 2019
@jajanusz So for the build, do we need to make the level to default OPTIMIZE_FOR_SIZE to BYT/CHT XCC build in make_XXXdefconfig. Or we need user to select the option? |
jajanusz
commented
Nov 6, 2019
Can be merged after #2061 |
lgirdwood
commented
Nov 6, 2019
Default is speed for all platforms unless size is selected. |
xiulipan
commented
Nov 7, 2019
@lgirdwood@jajanusz The problem now is for BYT/CHT XCC build will fail with |
Add configs for optimization levels. These configs should be used by build system to properly tune compiler flags. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
Use optimization configs that come from Kconfig in CMake to set appropriate compiler flags. Signed-off-by: Janusz Jankowski <janusz.jankowski@linux.intel.com>
9d21ac6 to
a222f96Comparejajanusz
commented
Nov 7, 2019
Yes, please |
jajanusz
commented
Nov 7, 2019
SOFCI TEST |
@xiulipan please let me know when you update and if I need to rebase in order to make it work |
xiulipan
commented
Nov 8, 2019
jajanusz
commented
Nov 8, 2019
@xiulipan You can use it now. I guess I'll see in other PRs if BSW works |
xiulipan
commented
Nov 8, 2019
@jajanusz Thank! |
Introduces configs for optimization levels.
F.e. Baytrail needs -Os to fit in IRAM when using XCC (probably tried to inline too much with -O2), as shown in #2024