-
Notifications
You must be signed in to change notification settings - Fork 7.8k
test: kernel: Exclude broken LTO builds #70305
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
test: kernel: Exclude broken LTO builds #70305
Conversation
f32d878
to
a35d8e8
Compare
If we want to use this solution, we should disable builds based on if |
a35d8e8
to
bfdb7d9
Compare
Just updated the PR. I guess you meant |
bfdb7d9
to
e93fe82
Compare
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.
I think it's better to prevent LTO with Code relocation enabled.
At least until it has been ensured that those two features generally works together.
Thus instead of the changes proposed in this PR, then make an extra dependency here:
Lines 430 to 432 in 1408d1e
config LTO | |
bool "Link Time Optimization [EXPERIMENTAL]" | |
depends on (!(GEN_ISR_TABLES || GEN_IRQ_VECTOR_TABLE) || ISR_TABLES_LOCAL_DECLARATION) && !NATIVE_LIBRARY |
like:
depends on (!(GEN_ISR_TABLES || GEN_IRQ_VECTOR_TABLE) || ISR_TABLES_LOCAL_DECLARATION) && !NATIVE_LIBRARY && !CODE_DATA_RELOCATION
@rakons have you done any verification related to LTO and the code relocation feature ?
I created a (draft) PR with this idea: #70426 While it also resolves (works around) my issue of no longer being able to pass CI with unrelated code changes, I am not a fan of it as it produce a new warning:
|
I had stated already in some issue here that I am not expecting LTO work as expected with code relocation. Ok - found it: #69730 (comment) |
@tejlmand Do you think it would be possible to exclude the files relocated with code relocation using the I am not sure if we can, since the code relocation feature uses generator expressions heavily. I tried to implement this to fix #69730 but did not get very far. |
I believe it should be possible. Implementing it should not take long but testing / verifying that things indeed work as expected is where I believe most time will need to be spend. |
@rettichschnidi I believe a combination of this PR (which filters out tests that enables data relocation) with the proposal in #70426 to avoid enabling LTO together with relocation will be the optimal solution to this problem. |
e93fe82
to
ddf153d
Compare
ddf153d
to
2866eb4
Compare
As per issue zephyrproject-rtos#69730, building arch.shared_interrupt.lto and kernel.common.lto for mimxrt685_evk or mimxrt595_evk/mimxrt595s/cm33 is currently broken due to their usage of CONFIG_CODE_DATA_RELOCATION. This commit disables LTO when CODE_DATA_RELOCATION is enabled, allowing PRs with changes in the kernel code to pass the CI check. On the down side, builds affected by this change produce a new warning: > warning: LTO (defined at Kconfig.zephyr:430) was assigned the value > 'y' but got the value 'n'. Check these unsatisfied dependencies: > (!CODE_DATA_RELOCATION) (=n) Signed-off-by: Reto Schneider <[email protected]>
Trying to enable LTO when CODE_DATA_RELOCATION is already enabled produces a warning. This commit prevents twister from building such combinations for kernel.common.lto. Signed-off-by: Reto Schneider <[email protected]>
Trying to enable LTO when CODE_DATA_RELOCATION is already enabled produces a warning. This commit prevents twister from building such combinations for arch.shared_interrupt.lto. Signed-off-by: Reto Schneider <[email protected]>
2866eb4
to
49a3fcc
Compare
This disables the LTO builds for platforms which are affected by build errors.
While not a solution for the underlying issue, those changes will allow unrelated PRs with changes in the kernel code to pass CI and get merged.
Hint: #70426 tries to resolve the same issue