intel-tbb: explicitly set OS var and pass to TBB (#23852)

The common.inc script in TBB uses the environ var 'OS' to determine
the platform it's on.  On Linux, this is normally empty and TBB falls
back to uname.  But some systems set this to 'CentOS Linux 8' which is
descriptive, but not exactly what common.inc is looking for.

Instead, take the value from python and explicitly set OS to what TBB
expects to avoid this problem.
This commit is contained in:
Mark W. Krentel 2021-06-08 17:06:16 -05:00 committed by GitHub
parent ac3b46fc95
commit 968d393f6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -135,6 +135,11 @@ def url_for_version(self, version):
name = '{0}'.format(version)
return url.format(name)
# We set OS here in case the user has it set to something else
# that TBB doesn't expect.
def setup_build_environment(self, env):
env.set('OS', platform.system())
def coerce_to_spack(self, tbb_build_subdir):
for compiler in ["icc", "gcc", "clang"]:
fs = glob.glob(join_path(tbb_build_subdir,