diff --git a/easybuild/easyconfigs/s/SPIRV-tools/SPIRV-tools-2025.1-GCCcore-14.2.0.eb b/easybuild/easyconfigs/s/SPIRV-tools/SPIRV-tools-2025.1-GCCcore-14.2.0.eb new file mode 100644 index 000000000000..5c1bbff1d2a6 --- /dev/null +++ b/easybuild/easyconfigs/s/SPIRV-tools/SPIRV-tools-2025.1-GCCcore-14.2.0.eb @@ -0,0 +1,111 @@ +easyblock = 'CMakeMake' + +name = 'SPIRV-tools' +version = '2025.1' + +homepage = 'https://github.com/KhronosGroup/SPIRV-Tools' +description = '''The SPIR-V Tools project provides an API and commands for processing SPIR-V modules. +The project includes an assembler, binary module parser, disassembler, validator, and optimizer for SPIR-V. +Except for the optimizer, all are based on a common static library. +The library contains all of the implementation details, and is used in the standalone tools whilst +also enabling integration into other code bases directly. +The optimizer implementation resides in its own library, which depends on the core library.''' + +toolchain = {'name': 'GCCcore', 'version': '14.2.0'} +toolchainopts = {'pic': True, 'openmp': True, 'cstd': 'c++17'} + +# From https://github.com/KhronosGroup/SPIRV-Tools/blob/v2024.3/DEPS +local_spirv_headers_commit = '09913f088a1197aba4aefd300a876b2ebbaa3391' +local_googletest_commit = 'c00fd25b71a17e645e4567fcb465c3fa532827d2' +local_google_effcee_commit = '12241cbc30f20730b656db7fd5a3fa36cd420843' +local_google_re2_commit = '6dcd83d60f7944926bfd308cc13979fc53dd69ca' +local_protobuf_commit = 'f0dc78d7e6e331b8c6bb2d5283e06aa26883ca7c' # Equivalent to tag v21.12 +local_abseil_commit = 'f004e6c0a9a25e16fd2a1ae671a9cacfa79625b4' + +local_github_repos = [ + ('KhronosGroup', 'SPIRV-Headers', local_spirv_headers_commit, 'spirv-headers'), + # Running with googletest also requires effcee -> re2 + abseil + ('google', 'googletest', local_googletest_commit, 'googletest'), + ('google', 'effcee', local_google_effcee_commit, 'effcee'), + ('google', 're2', local_google_re2_commit, 're2'), + ('protocolbuffers', 'protobuf', local_protobuf_commit, 'protobuf'), # Required for spirv-fuzzer + ('abseil', 'abseil-cpp', local_abseil_commit, 'abseil_cpp'), +] + +sources = [ + # See https://github.com/KhronosGroup/SPIRV-Tools/?tab=readme-ov-file#source-code-organization + # The packages marked as `` in the above link needs to be added to the `external/` directory and not as deps + { + 'download_filename': 'v%(version)s.tar.gz', + 'filename': 'SPIRV-tools-%(version)s.tar.gz', + 'extract_cmd': 'mkdir -p %(builddir)s/spirv-tools && tar xzvf %s --strip-components=1 -C $_', + 'source_urls': ['https://github.com/KhronosGroup/SPIRV-Tools/archive/refs/tags'], + } +] +checksums = [ + {'SPIRV-tools-2025.1.tar.gz': '6a9313fa68e061d463f616357cd24cdf1c3a27d906ea791d7ba67dd1b6666a40'}, + {'SPIRV-Headers-09913f08.tar.xz': 'ba3de7e2e702ea370362d230c4dfaa2a01a3a1c19179a0651a33500b188ee5ca'}, + {'googletest-c00fd25b.tar.xz': '8cf00043d0c9084341e631f459946a10da48cabbd45002208edadcd24dad5810'}, + {'effcee-12241cbc.tar.xz': '6198a8656cbc98037ba351c4d972ca742ec19148162da89ad1b2e875a304d8bb'}, + {'re2-6dcd83d6.tar.xz': '58051b8e0b230f0795212f8a5a4391c423f0d102a28dba2b2a80d7fdc44fee42'}, + {'protobuf-f0dc78d7.tar.xz': 'edfca29ce9ea890de8f6fbd17cab3a1020d48f99aa354f666926bf466730704a'}, + {'abseil-cpp-f004e6c0.tar.xz': '08970163ac291ee954242c196f77c529aaebf74ddb3a1765a334f68ca445e16d'}, +] + +local_ext_dir = '%(builddir)s/spirv-tools/external' +local_ext_cmd = 'tar xvf %s --strip-components=1 -C $_' +for local_owner, local_repo, local_commit, local_dir in local_github_repos: + sources.append({ + 'filename': '%s-%s.tar.xz' % (local_repo, local_commit[:8]), + 'extract_cmd': f'mkdir -p {local_ext_dir}/{local_dir} && {local_ext_cmd}', + 'git_config': { + 'url': f'https://github.com/{local_owner}', + 'repo_name': local_repo, + 'commit': local_commit, + }, + }) + +builddependencies = [ + ('binutils', '2.42'), + ('CMake', '3.31.3'), + ('Python', '3.13.1'), +] + +configopts = ' '.join([ + '-DSPIRV_BUILD_FUZZER=ON' +]) + +runtest = True + +sanity_check_paths = { + 'files': [ + 'bin/spirv-as', + 'bin/spirv-cfg', + 'bin/spirv-dis', + 'bin/spirv-lesspipe.sh', + 'bin/spirv-link', + 'bin/spirv-lint', + 'bin/spirv-objdump', + 'bin/spirv-opt', + 'bin/spirv-reduce', + 'bin/spirv-val', + 'bin/spirv-fuzz', + 'include/spirv-tools/libspirv.h', + 'lib/libSPIRV-Tools.a', + 'lib/libSPIRV-Tools-shared.so', + ], + 'dirs': [ + 'lib/cmake/SPIRV-Tools' + ], +} + +sanity_check_commands = [ + 'spirv-as --version', + 'spirv-dis --version', + 'spirv-link --version', + 'spirv-opt --version', + 'spirv-val --version', + 'spirv-fuzz --version', +] + +moduleclass = 'tools'