Commit 4f337faf authored by Paolo Bonzini's avatar Paolo Bonzini

KVM: allow disabling -Werror

Restrict -Werror to well-tested configurations and allow disabling it
via Kconfig.
Reported-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 575b255c
...@@ -59,6 +59,19 @@ config KVM ...@@ -59,6 +59,19 @@ config KVM
If unsure, say N. If unsure, say N.
config KVM_WERROR
bool "Compile KVM with -Werror"
# KASAN may cause the build to fail due to larger frames
default y if X86_64 && !KASAN
# We use the dependency on !COMPILE_TEST to not be enabled
# blindly in allmodconfig or allyesconfig configurations
depends on (X86_64 && !KASAN) || !COMPILE_TEST
depends on EXPERT
help
Add -Werror to the build flags for (and only for) i915.ko.
If in doubt, say "N".
config KVM_INTEL config KVM_INTEL
tristate "KVM for Intel (and compatible) processors support" tristate "KVM for Intel (and compatible) processors support"
depends on KVM && IA32_FEAT_CTL depends on KVM && IA32_FEAT_CTL
......
# SPDX-License-Identifier: GPL-2.0 # SPDX-License-Identifier: GPL-2.0
ccflags-y += -Iarch/x86/kvm ccflags-y += -Iarch/x86/kvm
ccflags-y += -Werror ccflags-$(CONFIG_KVM_WERROR) += -Werror
KVM := ../../../virt/kvm KVM := ../../../virt/kvm
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment