From 504ba8236d2b9ebba01082c6eda8e9883a293fe7 Mon Sep 17 00:00:00 2001 From: Leonardo de Moura Date: Sun, 11 Nov 2012 21:42:36 -0800 Subject: [PATCH] added support for clang++ on Linux Signed-off-by: Leonardo de Moura --- README | 2 +- configure.ac | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/README b/README index 4c4718ca3..26753e26d 100644 --- a/README +++ b/README @@ -35,7 +35,7 @@ To uninstall Z3, use sudo make uninstall -3) Building Z3 using clang++ on OSX +3) Building Z3 using clang++ on Linux/OSX Remark: clang does not support OpenMP yet. autoconf diff --git a/configure.ac b/configure.ac index d92af8f64..8033d3e76 100644 --- a/configure.ac +++ b/configure.ac @@ -129,6 +129,10 @@ AS_IF([test "$host_os" = "Darwin"], [ COMP_VERSIONS= STATIC_FLAGS=-static CXXFLAGS+=" -fno-strict-aliasing" + if test "$CXX" = "clang++"; then + CXXFLAGS+=" -Wno-unknown-pragmas -Wno-overloaded-virtual" + SLIBEXTRAFLAGS+=" -lrt" + fi ], [test "${host_os:0:6}" = "CYGWIN"], [ PLATFORM=win SO_EXT=.dll @@ -185,6 +189,11 @@ AC_OUTPUT(scripts/config-debug.mk scripts/config-release.mk) # ################### +MKMAKE_OPT= +if test "$CXX" = "clang++"; then + MKMAKE_OPT="--noomp" +fi + # Python is available, give user the option to generate the make files wherever they want cat <