Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions easybuild/easyblocks/l/llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,8 @@ def extra_options():
'disable_werror': [False, "Disable -Werror for all projects", CUSTOM],
'enable_rtti': [True, "Enable RTTI", CUSTOM],
'full_llvm': [False, "Build LLVM without any dependency", CUSTOM],
'install_libcxx_modules':
[None, "Install libstdc++ modules. Default relies on default of build system", CUSTOM],
'minimal': [False, "Build LLVM only", CUSTOM],
'python_bindings': [False, "Install python bindings", CUSTOM],
'skip_all_tests': [False, "Skip running of tests", CUSTOM],
Expand Down Expand Up @@ -599,6 +601,14 @@ def _configure_final_build(self):
# OMPT based tools
self._cmakeopts['OPENMP_ENABLE_OMPT_TOOLS'] = ompt_value

# Install C++ standard library modules.
# Internally disabled by default in LLVM 18, but enabled in LLVM 20.
if self.cfg['install_libcxx_modules'] is not None:
if self.cfg['install_libcxx_modules']:
self._cmakeopts['LIBCXX_INSTALL_MODULES'] = 'ON'
else:
self._cmakeopts['LIBCXX_INSTALL_MODULES'] = 'OFF'

# Make sure tests are not running with more than 'parallel' tasks
parallel = self.cfg.parallel
if not build_option('mpi_tests'):
Expand Down Expand Up @@ -1700,12 +1710,16 @@ def sanity_check_step(self, custom_paths=None, custom_commands=None, *args, **kw
# Starting from LLVM 19, omp related libraries are installed the runtime library directory
check_librt_files += omp_lib_files

if self.cfg['install_libcxx_modules']:
check_files += [os.path.join('share', 'libc++', 'v1', 'std.cppm')]

if self.cfg['build_openmp_tools']:
check_files += [os.path.join('lib', 'clang', resdir_version, 'include', 'ompt.h')]
if version < '19':
check_lib_files += ['libarcher.so']
else:
check_librt_files += ['libarcher.so']

if self.cfg['python_bindings']:
custom_commands += ["python -c 'import clang'"]
custom_commands += ["python -c 'import mlir'"]
Expand Down