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`.
This commit is contained in:
Glenn Johnson 2022-05-21 01:38:01 -05:00 committed by GitHub
parent 4fbb822072
commit d688a699fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -766,7 +766,8 @@ def name_matches(name, name_list):
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