From d688a699fa2b8d4e4f72d635c831e9bedfefca91 Mon Sep 17 00:00:00 2001 From: Glenn Johnson Date: Sat, 21 May 2022 01:38:01 -0500 Subject: Fix toolchain detection for oneapi/dpcpp compilers (#30775) The oneapi and dpcpp compilers are essentially the same except for which binary is used foc CXX. Spack will detect them as "mixed toolchain" and not inject compiler optimization flags. This will be needed once archspec has entries for the oneapi and dpcpp compilers. This PR detects when dpcpp and oneapi are in the toolchains list and explicitly sets `is_mixed_toolchain` to `False`. --- lib/spack/spack/compilers/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/spack/spack/compilers/__init__.py b/lib/spack/spack/compilers/__init__.py index 73ba07237d..17f65e6409 100644 --- a/lib/spack/spack/compilers/__init__.py +++ b/lib/spack/spack/compilers/__init__.py @@ -766,7 +766,8 @@ def is_mixed_toolchain(compiler): toolchains.add(compiler_cls.__name__) if len(toolchains) > 1: - if toolchains == set(['Clang', 'AppleClang', 'Aocc']): + if toolchains == set(['Clang', 'AppleClang', 'Aocc']) or \ + toolchains == set(['Dpcpp', 'Oneapi']): return False tty.debug("[TOOLCHAINS] {0}".format(toolchains)) return True -- cgit v1.2.3-60-g2f50