aboutsummaryrefslogtreecommitdiffstats
path: root/Config.mk
diff options
context:
space:
mode:
authorTim Deegan <Tim.Deegan@citrix.com>2011-03-07 11:21:11 +0000
committerTim Deegan <Tim.Deegan@citrix.com>2011-03-07 11:21:11 +0000
commit436323c065f0ace4f469f5854f43423702a5082a (patch)
treea93c7f16cc6371a524eedcd7c642848f0d244f66 /Config.mk
parentcde9655eddba4d6636249863e41b2bb5103ba2ee (diff)
downloadxen-436323c065f0ace4f469f5854f43423702a5082a.tar.gz
xen-436323c065f0ace4f469f5854f43423702a5082a.tar.bz2
xen-436323c065f0ace4f469f5854f43423702a5082a.zip
xen: add "clang=y" option to build Xen with clang/llvm instead of gcc.
Tested with svn snapshot of clang and llvm from 17 February 2011. Only x86_64 hypervisor builds (make dist-xen clang=y) are supported and I haven't even begun to look at cross-compiling. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com> Acked-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'Config.mk')
-rw-r--r--Config.mk7
1 files changed, 7 insertions, 0 deletions
diff --git a/Config.mk b/Config.mk
index 753d3327c3..aee6e5b8ad 100644
--- a/Config.mk
+++ b/Config.mk
@@ -148,6 +148,13 @@ CFLAGS += -Wall -Wstrict-prototypes
# result of any casted expression causes a warning.
CFLAGS += -Wno-unused-value
+ifeq ($(clang),y)
+# Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
+CFLAGS += -Wno-parentheses
+# And is over-zealous with the printf format lint
+CFLAGS += -Wno-format
+endif
+
$(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
$(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)