[vlc-devel] [PATCH] configure: Prevent clang from accepting unknown compile flags
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Wed Sep 6 11:13:27 CEST 2017
---
configure.ac | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/configure.ac b/configure.ac
index 9c07e2afc0..2b1885e242 100644
--- a/configure.ac
+++ b/configure.ac
@@ -929,6 +929,10 @@ dnl
dnl Compiler warnings
dnl
+dnl Prevent clang from accepting unknown flags with a mere warning
+AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option], [CFLAGS])
+AX_APPEND_COMPILE_FLAGS([-Werror=unknown-warning-option], [CXXFLAGS])
+
AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security], [CFLAGS])
AX_APPEND_COMPILE_FLAGS([-Wall -Wextra -Wsign-compare -Wundef -Wpointer-arith -Wvolatile-register-var -Wformat -Wformat-security], [CXXFLAGS])
--
2.11.0
More information about the vlc-devel
mailing list