intel-oneapi-compiler: Fix generation of config files (#43654)

Commit 330a9a7c9a aimed at preventing
generation of .cfg files when a given compiler does not exist
in the particular release. However the check does not
contain the full paths so it always fails resulting in empty
.cfg files. This commit fixes it.
This commit is contained in:
Kacper Kornet 2024-04-14 00:34:58 +01:00 committed by GitHub
parent fc3fc94689
commit 2c22ae0576
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -338,7 +338,7 @@ def write_config_file(self, flags, path, compilers):
# Tolerate missing compilers.
# Initially, we installed icx/ifx/icc/ifort into a single prefix.
# Starting in 2024, there is no icc. 2023.2.3 does not have an ifx.
if os.path.exists(compiler):
if os.path.exists(path.join(compiler)):
p = path.join(compiler + ".cfg")
with open(p, "w") as f:
f.write(" ".join(flags))