-
Notifications
You must be signed in to change notification settings - Fork 349
cmake: optimization levels #2054
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: optimization levels #2054
Conversation
|
@lbetlej @lgirdwood |
paulstelian97
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
|
@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 |
|
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will be useful for debug too.
|
@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? |
|
Can be merged after #2061 |
Default is speed for all platforms unless size is selected. |
|
@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
a222f96
Compare
Yes, please |
|
SOFCI TEST |
|
@xiulipan please let me know when you update and if I need to rebase in order to make it work |
|
@xiulipan You can use it now. I guess I'll see in other PRs if BSW works |
|
@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