-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
[v2.7] toolchain: Move extra warning options to toolchain abstraction #66501
Conversation
Move extra warning option from generic twister script into compiler-dependent config files. ARCMWDT compiler doesn't support extra warning options ex. "-Wl,--fatal-warnings". To avoid build fails flag "disable_warnings_as_errors" should be passed to twister. This allows all warning messages and make atomatic test useles. Signed-off-by: Nikolay Agishev <[email protected]> (cherry picked from commit 0dec4cf)
GCC_VERSION is defined in a few modules, and those headers are often included first, so replace the one used in zephyr with TOOLCHAIN_GCC_VERSION. Do the same with CLANG_VERSION, replacing it with TOOLCHAIN_CLANG_VERSION. BUILD_ASSERT is also defined in include/toolchain/common.h, which might get included before gcc.h. We want to use the gcc-specific one instead of the general one. Signed-off-by: Keith Packard <[email protected]> (cherry picked from commit c58c76e)
Also needed to (partially) cherry-pick 6e4f192 to avoid the |
@tejlmand - should be ready for you if you can take a look. Also @evgeniy-paltsev - your approval would be appreciated as well. |
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 looks more like an enhancement than a bug fix.
@stephanosio - someone at Meta complained directly to myself and @ycsin that this was missing, so I filed the issue and did the backport personally. To that person, it definitely seemed to be a bug in the build system that there was no common way to promote warnings to errors. I could refer that person to you if you would like to argue about it, but you would probably be there a while. Cc @jgl-meta @luchnikov 😂 |
ce4c30f
into
zephyrproject-rtos:v2.7-branch
Backport of #53305
Fixes #66500
Note: Compliance failure is a false positive (those lines are not modified with this commit)
Move extra warning option from generic twister script into compiler-dependent config files. ARCMWDT compiler doesn't support extra warning options ex. "-Wl,--fatal-warnings". To avoid build fails flag "disable_warnings_as_errors" should be passed to twister.
This allows all warning messages and make atomatic test useles.