diff options
author | John Baldwin <jhb@FreeBSD.org> | 2022-11-19 04:11:59 +0000 |
---|---|---|
committer | John Baldwin <jhb@FreeBSD.org> | 2022-11-19 04:11:59 +0000 |
commit | 063b380f54b04eaab8ee26e39d6e8128523d16ad (patch) | |
tree | eee46828fbc70b97a60cc838a36aadbbe7c55f79 | |
parent | b9cb80883bce6dc992cf05ae2e59089a60d311ec (diff) | |
download | src-063b380f54b04eaab8ee26e39d6e8128523d16ad.tar.gz src-063b380f54b04eaab8ee26e39d6e8128523d16ad.zip |
bsd.compiler.mk: Add a c++20 compiler feature.
This is enabled for clang versions 10+ and GCC versions 10+.
Reviewed by: imp
Differential Revision: https://reviews.freebsd.org/D36892
-rw-r--r-- | share/mk/bsd.compiler.mk | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/mk/bsd.compiler.mk b/share/mk/bsd.compiler.mk index c8fb9e1ba4a8..e34c3c62a7e8 100644 --- a/share/mk/bsd.compiler.mk +++ b/share/mk/bsd.compiler.mk @@ -235,6 +235,10 @@ ${X_}COMPILER_FEATURES+= c++11 c++14 (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 70000) ${X_}COMPILER_FEATURES+= c++17 .endif +.if (${${X_}COMPILER_TYPE} == "clang" && ${${X_}COMPILER_VERSION} >= 100000) || \ + (${${X_}COMPILER_TYPE} == "gcc" && ${${X_}COMPILER_VERSION} >= 100100) +${X_}COMPILER_FEATURES+= c++20 +.endif .if ${${X_}COMPILER_TYPE} == "clang" ${X_}COMPILER_FEATURES+= retpoline init-all # PR257638 lld fails with BE compressed debug. Fixed in main but external tool |