-
Notifications
You must be signed in to change notification settings - Fork 8.2k
cmake: toolchain: generalize exclusion of CXX options #21398
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: toolchain: generalize exclusion of CXX options #21398
Conversation
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.
list(APPEND
then it could be populated elsewhere 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.
thanks; updated.
44311eb to
55c4f32
Compare
cmake/extensions.cmake
Outdated
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.
# -Werror=implicit-int and other flags in CXX_EXCLUDED_OPTIONS are not supported for CXX and we are not able
Sorry for the stepwise feedback.
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.
Is the new wording OK? I didn't want to mention specific flags because they might not apply to certain toolchains.
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.
Looks great
-Wold-style-definition is not a supported option for C++ builds. To prevent it being passed: * the list of compiler flags to be excluded from C++ builds is moved to be toolchain-specific; * -Wold-style-definition is added to that list for gcc and clang; * -Wold-style-definition is moved from zephyr_compiler_options to zephyr_cc_option so the option checking code is executed for it. Signed-off-by: Peter A. Bigot <[email protected]>
55c4f32 to
269bb2f
Compare
-Wold-style-definitionis not a supported option for C++ builds. To prevent it being passed:-Wold-style-definitionis added to that list for gcc and clang;-Wold-style-definitionis moved fromzephyr_compiler_optionstozephyr_cc_optionso the option checking code is executed for it.Fixes #16239