kbuild: refactor cc-option-yn, cc-disable-warning, rust-option-yn macros
authorMasahiro Yamada <masahiroy@kernel.org>
Wed, 9 Oct 2024 10:27:37 +0000 (19:27 +0900)
committerMiguel Ojeda <ojeda@kernel.org>
Wed, 9 Oct 2024 22:50:58 +0000 (00:50 +0200)
commitb55da84759c8c21ec0c7441c519fc1d07dc4c65c
treece519f393c280edd0607bf4b06f469768098f722
parentab8851431bef5cc44f0f3f0da112e883fd4d0df5
kbuild: refactor cc-option-yn, cc-disable-warning, rust-option-yn macros

cc-option-yn and cc-disable-warning duplicate the compile command seen
a few lines above. These can be defined based on cc-option.

I also refactored rustc-option-yn in the same way, although there are
currently no users of it.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Alice Ryhl <aliceryhl@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20241009102821.2675718-1-masahiroy@kernel.org
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
scripts/Makefile.compiler