Kaydet (Commit) 687d97b9 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Make Clang version detection work for clang-cl

...which does not behave as expected with the given command line arguments, so
just strip "-cl.exe" (and any hard-coded command line arguments following it in
$CC, but that's probably rather harmless here).  Expects that clang-cl is given
with an ".exe" extension in $CC (not assuming that and stripping "-cl" and
everything that might follow could be a bit too agressive).

Change-Id: If99f964dda1369b7d4bbb63b3d634b93c9f935a8
üst d8a42339
......@@ -3762,8 +3762,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
if test "$COM_IS_CLANG" = TRUE; then
AC_MSG_CHECKING([the Clang version])
clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | $CC -E -P -`
CLANG_FULL_VERSION=`echo __clang_version__ | $CC -E -P -`
clang_version=`echo __clang_major__.__clang_minor__.__clang_patchlevel__ | ${CC%-cl.exe*} -E -P -`
CLANG_FULL_VERSION=`echo __clang_version__ | ${CC%-cl.exe*} -E -P -`
CLANGVER=`echo $clang_version | $AWK -F. '{ print \$1*10000+\$2*100+\$3 }'`
AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment