diff --git a/easybuild/easyblocks/l/llvm.py b/easybuild/easyblocks/l/llvm.py index 7242192a3f2..35d2fecf358 100644 --- a/easybuild/easyblocks/l/llvm.py +++ b/easybuild/easyblocks/l/llvm.py @@ -1714,6 +1714,9 @@ def sanity_check_step(self, custom_paths=None, custom_commands=None, *args, **kw # Here, we add the system libraries LLVM expects to find minimal_cpp_compiler_cmd += "$(llvm-config --link-static --system-libs all)" custom_commands.append(minimal_cpp_compiler_cmd) + # binutils is required for the linking step + kwargs.setdefault('extra_modules', []).extend( + d['short_mod_name'] for d in self.cfg.dependencies() if d['name'] == 'binutils') return super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands, *args, **kwargs) @@ -1734,7 +1737,6 @@ def make_module_step(self, *args, **kwargs): self.log.debug(f"List of subdirectories for libraries to add to $LD_LIBRARY_PATH + $LIBRARY_PATH: {lib_dirs}") self.module_load_environment.LD_LIBRARY_PATH = lib_dirs self.module_load_environment.LIBRARY_PATH = lib_dirs - return super().make_module_step(*args, **kwargs) def make_module_extra(self):