Add c++14 and c++17 to COMPILER_FEATURES
This will be used to gate the fusefs tests. It's a partial merge of r348281 from projects/fuse2. Reviewed by: kib, emaste MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21044
This commit is contained in:
parent
d78b126a34
commit
204e15916d
@ -19,6 +19,8 @@
|
||||
# COMPILER_FEATURES will contain one or more of the following, based on
|
||||
# compiler support for that feature:
|
||||
#
|
||||
# - c++17: supports full (or nearly full) C++17 programming environment.
|
||||
# - c++14: supports full (or nearly full) C++14 programming environment.
|
||||
# - c++11: supports full (or nearly full) C++11 programming environment.
|
||||
# - retpoline: supports the retpoline speculative execution vulnerability
|
||||
# mitigation.
|
||||
@ -200,10 +202,18 @@ ${X_}COMPILER_FREEBSD_VERSION= unknown
|
||||
.endif
|
||||
|
||||
${X_}COMPILER_FEATURES=
|
||||
.if ${${X_}COMPILER_TYPE} == "clang" || \
|
||||
.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 30300) || \
|
||||
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 40800)
|
||||
${X_}COMPILER_FEATURES+= c++11
|
||||
.endif
|
||||
.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 30400) || \
|
||||
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 50000)
|
||||
${X_}COMPILER_FEATURES+= c++14
|
||||
.endif
|
||||
.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 50000) || \
|
||||
(${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 70000)
|
||||
${X_}COMPILER_FEATURES+= c++17
|
||||
.endif
|
||||
.if ${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 60000
|
||||
${X_}COMPILER_FEATURES+= retpoline
|
||||
.endif
|
||||
|
Loading…
Reference in New Issue
Block a user