Skip to content

Commit 4f337fa

Browse files
committed
KVM: allow disabling -Werror
Restrict -Werror to well-tested configurations and allow disabling it via Kconfig. Reported-by: Christoph Hellwig <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 575b255 commit 4f337fa

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

arch/x86/kvm/Kconfig

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ config KVM
5959

6060
If unsure, say N.
6161

62+
config KVM_WERROR
63+
bool "Compile KVM with -Werror"
64+
# KASAN may cause the build to fail due to larger frames
65+
default y if X86_64 && !KASAN
66+
# We use the dependency on !COMPILE_TEST to not be enabled
67+
# blindly in allmodconfig or allyesconfig configurations
68+
depends on (X86_64 && !KASAN) || !COMPILE_TEST
69+
depends on EXPERT
70+
help
71+
Add -Werror to the build flags for (and only for) i915.ko.
72+
73+
If in doubt, say "N".
74+
6275
config KVM_INTEL
6376
tristate "KVM for Intel (and compatible) processors support"
6477
depends on KVM && IA32_FEAT_CTL

arch/x86/kvm/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# SPDX-License-Identifier: GPL-2.0
22

33
ccflags-y += -Iarch/x86/kvm
4-
ccflags-y += -Werror
4+
ccflags-$(CONFIG_KVM_WERROR) += -Werror
55

66
KVM := ../../../virt/kvm
77

0 commit comments

Comments
 (0)