Skip to content
Snippets Groups Projects
Commit 806820d1 authored by Ondřej Surý's avatar Ondřej Surý
Browse files

Disable fast zone parser when used with LLVM backed compiler (closes #351)

parent 9f765207
Branches
Tags
1 merge request!376Disable fast zone parser when used with LLVM backed compiler (closes #351)
......@@ -58,6 +58,8 @@ AM_CONDITIONAL([HAVE_DOCS], [test "$enable_documentation" = "yes"])
AC_PROG_INSTALL
AX_CC_LLVM
AC_ARG_ENABLE([fastparser],
AS_HELP_STRING([--disable-fastparser], [Disable use of fastest zone parser]),[],[
# Set zone parser type - fastest on release build, slowest on dev build
......@@ -67,6 +69,14 @@ AC_ARG_ENABLE([fastparser],
enable_fastparser=yes
])
])
AS_IF([test "$enable_fastparser" = "yes"],[
AS_IF([test "${CC_LLVM}" = "yes"],[
AC_MSG_WARN([LLVM based compiler detected; disabling fastest zone parser, see https://gitlab.labs.nic.cz/labs/knot/issues/351])
enable_fastparser=no
])
])
AM_CONDITIONAL([FAST_PARSER], [test "$enable_fastparser" = "yes"])
# GnuTLS crypto backend
......
dnl Check to see if the C compiler is clang or llvm-gcc
dnl
AC_DEFUN([AX_CC_LLVM],[
AC_REQUIRE([AC_PROG_CC])
AC_MSG_CHECKING([whether C compiler has a LLVM backend])
$CC -x c /dev/null -dM -E > conftest.txt 2>&1
if grep "__llvm__" conftest.txt >/dev/null 2>&1; then
CC_LLVM=yes
else
CC_LLVM=no
fi
AC_SUBST([CC_LLVM])
AC_MSG_RESULT([$CC_LLVM])
rm -f conftest.txt
])
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