@@ -72,6 +72,12 @@ AC_DEFUN([ACSM_DETERMINE_CXX_BRAND],
72
72
[ clang_vendor="Apple clang"] )
73
73
74
74
AS_CASE ( "x$ACSM_CLANG_VERSION_STRING" ,
75
+ [ *clang\ version\ 20.*] , [ AC_MSG_RESULT ( <<< C++ compiler is clang-20.x >>> )
76
+ ACSM_CLANG_VERSION=20] ,
77
+ [ *clang\ version\ 19.*] , [ AC_MSG_RESULT ( <<< C++ compiler is clang-19.x >>> )
78
+ ACSM_CLANG_VERSION=19] ,
79
+ [ *clang\ version\ 18.*] , [ AC_MSG_RESULT ( <<< C++ compiler is clang-18.x >>> )
80
+ ACSM_CLANG_VERSION=18] ,
75
81
[ *clang\ version\ 17.*] , [ AC_MSG_RESULT ( <<< C++ compiler is clang-17.x >>> )
76
82
ACSM_CLANG_VERSION=17] ,
77
83
[ *clang\ version\ 16.*] , [ AC_MSG_RESULT ( <<< C++ compiler is clang-16.x >>> )
@@ -620,6 +626,16 @@ AC_DEFUN([ACSM_SET_CXX_FLAGS],
620
626
ACSM_CFLAGS_OPT="-O2 -Qunused-arguments -Wunused"
621
627
ACSM_CFLAGS_DEVEL="$ACSM_CFLAGS_OPT -g -Wimplicit -fno-limit-debug-info -Wunused"
622
628
ACSM_CFLAGS_DBG="-g -Wimplicit -Qunused-arguments -fno-limit-debug-info -Wunused"
629
+
630
+ dnl This argument appears in clang 17 and
631
+ dnl appears to become necessary to safely
632
+ dnl dynamic_cast in later clang on OSX
633
+ AS_IF ( [ test "x$ACSM_CLANG_VERSION" = "xother" || test $ACSM_CLANG_VERSION -ge 17] ,
634
+ [
635
+ ACSM_CXXFLAGS_OPT="$ACSM_CFLAGS_OPT -fno-assume-unique-vtables"
636
+ ACSM_CXXFLAGS_DEVEL="$ACSM_CFLAGS_DEVEL -fno-assume-unique-vtables"
637
+ ACSM_CXXFLAGS_DBG="$ACSM_CFLAGS_DBG -fno-assume-unique-vtables"
638
+ ] )
623
639
] ,
624
640
625
641
dnl default case
0 commit comments