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:
parent
4fbb822072
commit
d688a699fa
1 changed files with 2 additions and 1 deletions
|
@ -766,7 +766,8 @@ def name_matches(name, name_list):
|
||||||
toolchains.add(compiler_cls.__name__)
|
toolchains.add(compiler_cls.__name__)
|
||||||
|
|
||||||
if len(toolchains) > 1:
|
if len(toolchains) > 1:
|
||||||
if toolchains == set(['Clang', 'AppleClang', 'Aocc']):
|
if toolchains == set(['Clang', 'AppleClang', 'Aocc']) or \
|
||||||
|
toolchains == set(['Dpcpp', 'Oneapi']):
|
||||||
return False
|
return False
|
||||||
tty.debug("[TOOLCHAINS] {0}".format(toolchains))
|
tty.debug("[TOOLCHAINS] {0}".format(toolchains))
|
||||||
return True
|
return True
|
||||||
|
|
Loading…
Reference in a new issue