Skip to content

Commit

Permalink
Enhance AOCC EasyBlock to work with LLVM 16 and newer
Browse files Browse the repository at this point in the history
Enhances the AOCC EasyBlock so that internal LLVM versions newer than
LLVM 16 map to the correct resource dir. In addition, update the list of
AOCC to LLVM versions to the most up-to-date one, helping when writing
AOCC EasyConfigs.

Signed-off-by: Jan André Reuter <[email protected]>
  • Loading branch information
Thyre committed Sep 23, 2024
1 parent 5cdeaef commit 46a63a6
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion easybuild/easyblocks/a/aocc.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ def _aocc_guess_clang_version(self):
'3.0.0': '12.0.0',
'3.1.0': '12.0.0',
'3.2.0': '13.0.0',
'4.0.0': '14.0.6',
'4.1.0': '16.0.3',
'4.2.0': '16.0.3',
}

if self.version in map_aocc_to_clang_ver:
Expand Down Expand Up @@ -138,6 +141,12 @@ def create_wrapper(wrapper_comp):

def sanity_check_step(self):
"""Custom sanity check for AOCC, based on sanity check for Clang."""

# Clang v16+ only use the major version number for the resource dir
resdir_version = self.clangversion
if self.clangversion >= '16':
resdir_version = LooseVersion(self.clangversion).version[0]

shlib_ext = get_shared_lib_ext()
custom_paths = {
'files': [
Expand All @@ -147,7 +156,7 @@ def sanity_check_step(self):
'lib/clang/%s/include/stddef.h' % self.clangversion, 'lib/libclang.%s' % shlib_ext,
'lib/libomp.%s' % shlib_ext,
],
'dirs': ['include/llvm', 'lib/clang/%s/lib' % self.clangversion, 'lib32'],
'dirs': ['include/llvm', 'lib/clang/%s/lib' % resdir_version, 'lib32'],
}

custom_commands = [
Expand Down

0 comments on commit 46a63a6

Please sign in to comment.