Skip to content

Commit

Permalink
pythongh-96398: Detect emcc and mpicc in compiler names in configure
Browse files Browse the repository at this point in the history
  • Loading branch information
erlend-aasland committed Apr 12, 2024
1 parent 39a6b29 commit 5e0ab50
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 7 additions & 2 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 7 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -992,7 +992,9 @@ dnl check for GCC last, other compilers set __GNUC__, too.
dnl msvc is listed for completeness.
AC_CACHE_CHECK([for CC compiler name], [ac_cv_cc_name], [
cat > conftest.c <<EOF
#if defined(__INTEL_COMPILER) || defined(__ICC)
#if defined(__EMSCRIPTEN__)
emcc
#elif defined(__INTEL_COMPILER) || defined(__ICC)
icc
#elif defined(__ibmxl__) || defined(__xlc__) || defined(__xlC__)
xlc
Expand All @@ -1009,6 +1011,9 @@ EOF
if $CPP $CPPFLAGS conftest.c >conftest.out 2>/dev/null; then
ac_cv_cc_name=`grep -v '^#' conftest.out | grep -v '^ *$' | tr -d ' '`
if $(expr "//$CC" : '.*/\(.*\)') = "mpicc"; then
ac_cv_cc_name="mpicc"
fi
else
ac_cv_cc_name="unknown"
fi
Expand Down Expand Up @@ -1939,7 +1944,7 @@ if test "$Py_LTO" = 'true' ; then
;;
esac
;;
*emcc*)
emcc)
if test "$Py_LTO_POLICY" != "default"; then
AC_MSG_ERROR([emcc supports only default lto.])
fi
Expand Down

0 comments on commit 5e0ab50

Please sign in to comment.