diff options
author | Glenn Johnson <glenn-johnson@uiowa.edu> | 2022-05-21 01:38:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-21 08:38:01 +0200 |
commit | d688a699fa2b8d4e4f72d635c831e9bedfefca91 (patch) | |
tree | 7a86b5cc5c8f363cee187fd0bbaf59e1d473c958 /lib | |
parent | 4fbb82207220a0717dbf8e8fdba6e9f0c03f6429 (diff) | |
download | spack-d688a699fa2b8d4e4f72d635c831e9bedfefca91.tar.gz spack-d688a699fa2b8d4e4f72d635c831e9bedfefca91.tar.bz2 spack-d688a699fa2b8d4e4f72d635c831e9bedfefca91.tar.xz spack-d688a699fa2b8d4e4f72d635c831e9bedfefca91.zip |
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`.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/compilers/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 |