llvm.org GIT mirror llvm / 8039e03
Add an autoconf test to check for optional compiler flags like -Wno-missing-field-initializers or -Wno-variadic-macros. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85147 91177308-0d34-0410-b5e6-96231b3b80d8 Julien Lerouge 9 years ago
3 changed file(s) with 14 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
319319 # support (via the -load option).
320320 ENABLE_LLVMC_DYNAMIC_PLUGINS = 1
321321 #@ENABLE_LLVMC_DYNAMIC_PLUGINS@
322
323 # Optional flags supported by the compiler
324 # -Wno-missing-field-initializers
325 NO_MISSING_FIELD_INITIALIZERS = @NO_MISSING_FIELD_INITIALIZERS@
326 # -Wno-variadic-macros
327 NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@
942942 dnl Tool compatibility is okay if we make it here.
943943 AC_MSG_RESULT([ok])
944944
945 dnl Check optional compiler flags.
946 AC_MSG_CHECKING([optional compiler flags])
947 CXX_FLAG_CHECK(NO_VARIADIC_MACROS, [-Wno-variadic-macros])
948 CXX_FLAG_CHECK(NO_MISSING_FIELD_INITIALIZERS, [-Wno-missing-field-initializers])
949 AC_MSG_RESULT([$NO_VARIADIC_MACROS $NO_MISSING_FIELD_INITIALIZERS])
950
945951 dnl===-----------------------------------------------------------------------===
946952 dnl===
947953 dnl=== SECTION 5: Check for libraries
0 AC_DEFUN([CXX_FLAG_CHECK],
1 [AC_SUBST($1, `$CXX $2 -fsyntax-only -xc /dev/null 2>/dev/null && echo $2`)])