Some warnings depened on the version of clang, allow us to check.

Reviewed by: obrien
This commit is contained in:
Simon J. Gerraty 2014-05-02 01:39:44 +00:00
parent 47f881af0f
commit 1c19778e8d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/projects/bmake/; revision=265210
2 changed files with 9 additions and 1 deletions

View File

@ -26,6 +26,11 @@ COMPILER_TYPE:= clang
.if ${COMPILER_TYPE} == "clang"
COMPILER_FEATURES= c++11
.if !defined(_COMPILER_VERSION)
_COMPILER_VERSION!= ${CC} --version
.endif
# some warnings are version specific
COMPILER_VERSION:= ${_COMPILER_VERSION:M[1-9].[0-9]*}
.else
COMPILER_FEATURES=
.endif

View File

@ -67,7 +67,10 @@ CWARNFLAGS+= -Wno-pointer-sign
# is set to low values, these have to be disabled explicitly.
.if ${COMPILER_TYPE} == "clang" && !defined(EARLY_BUILD)
.if ${WARNS} <= 6
CWARNFLAGS+= -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable
CWARNFLAGS+= -Wno-empty-body -Wno-string-plus-int
.if ${COMPILER_VERSION} > 3.3
CWARNFLAGS+= -Wno-unused-const-variable
.endif
.endif # WARNS <= 6
.if ${WARNS} <= 3
CWARNFLAGS+= -Wno-tautological-compare -Wno-unused-value\