2021-01-01 23:10:28 -08:00
|
|
|
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
|
2020-08-12 17:36:35 -07:00
|
|
|
# Spack Project Developers. See the top-level COPYRIGHT file for details.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
|
|
|
|
|
|
|
|
|
|
|
|
from spack import *
|
|
|
|
|
|
|
|
|
|
|
|
class Comgr(CMakePackage):
|
|
|
|
"""This provides various Lightning Compiler related services. It currently
|
|
|
|
contains one library, the Code Object Manager (Comgr)"""
|
|
|
|
|
|
|
|
homepage = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport"
|
2021-04-27 14:38:14 -04:00
|
|
|
git = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport.git"
|
2021-09-03 06:25:31 -07:00
|
|
|
url = "https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/archive/rocm-4.3.1.tar.gz"
|
2020-08-12 17:36:35 -07:00
|
|
|
|
2021-06-17 11:52:33 +02:00
|
|
|
maintainers = ['srekolam', 'arjun-raj-kuppala', 'haampie']
|
2020-08-12 17:36:35 -07:00
|
|
|
|
2021-04-27 14:38:14 -04:00
|
|
|
version('master', branch='amd-stg-open')
|
2021-09-03 06:25:31 -07:00
|
|
|
version('4.3.1', sha256='f1d99550383ed7b3a01d304eedc3d86a8e45b271aa5a80b1dd099c22fda3f745')
|
2021-08-09 00:48:05 -07:00
|
|
|
version('4.3.0', sha256='f77b505abb474078374701dfc49e651ad3eeec5349ce6edda54549943a3775ee')
|
2021-05-13 06:27:20 -04:00
|
|
|
version('4.2.0', sha256='40a1ea50d2aea0cf75c4d17cdd6a7fe44ae999bf0147d24a756ca4675ce24e36')
|
2021-03-26 09:18:01 -04:00
|
|
|
version('4.1.0', sha256='ffb625978555c63582aa46857672431793261166aa31761eff4fe5c2cab661ae')
|
2021-01-04 21:36:44 +05:30
|
|
|
version('4.0.0', sha256='f389601fb70b2d9a60d0e2798919af9ddf7b8376a2e460141507fe50073dfb31')
|
2020-12-03 00:03:40 +05:30
|
|
|
version('3.10.0', sha256='b44ee5805a6236213d758fa4b612bb859d8f774b9b4bdc3a2699bb009dd631bc')
|
2020-11-04 00:09:40 +05:30
|
|
|
version('3.9.0', sha256='6600e144d72dadb6d893a3388b42af103b9443755ce556f4e9e205ccd8ec0c83')
|
2020-09-22 21:39:03 +05:30
|
|
|
version('3.8.0', sha256='62a35480dfabaa98883d91ed0f7c490daa9bbd424af37e07e5d85a6e8030b146')
|
2020-09-03 02:50:05 +02:00
|
|
|
version('3.7.0', sha256='73e56ec3c63dade24ad351e9340e2f8e127694028c1fb7cec5035376bf098432')
|
2020-08-12 17:36:35 -07:00
|
|
|
version('3.5.0', sha256='25c963b46a82d76d55b2302e0e18aac8175362656a465549999ad13d07b689b9')
|
|
|
|
|
|
|
|
variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type')
|
|
|
|
|
2020-12-15 06:55:45 -06:00
|
|
|
# Disable the hip compile tests. Spack should not be using
|
|
|
|
# /opt/rocm, and this breaks the build when /opt/rocm exists.
|
2021-08-09 00:48:05 -07:00
|
|
|
patch('hip-tests.patch', when='@:4.2.0')
|
2020-12-15 06:55:45 -06:00
|
|
|
|
|
|
|
depends_on('cmake@3.2.0:', type='build', when='@:3.8.99')
|
|
|
|
depends_on('cmake@3.13.4:', type='build', when='@3.9.0:')
|
|
|
|
|
2020-09-22 21:39:03 +05:30
|
|
|
depends_on('zlib', type='link')
|
|
|
|
depends_on('z3', type='link')
|
|
|
|
depends_on('ncurses', type='link')
|
2020-12-15 06:55:45 -06:00
|
|
|
|
2021-04-27 14:38:14 -04:00
|
|
|
for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0',
|
2021-09-03 06:25:31 -07:00
|
|
|
'4.2.0', '4.3.0', '4.3.1', 'master']:
|
2021-06-17 11:52:33 +02:00
|
|
|
# llvm libs are linked statically, so this *could* be a build dep
|
|
|
|
depends_on('llvm-amdgpu@' + ver, when='@' + ver)
|
|
|
|
|
|
|
|
# aomp may not build rocm-device-libs as part of llvm-amdgpu, so make
|
|
|
|
# that a conditional dependency
|
|
|
|
depends_on('rocm-device-libs@' + ver, when='@{0} ^llvm-amdgpu ~rocm-device-libs'.format(ver))
|
2020-08-12 17:36:35 -07:00
|
|
|
depends_on('rocm-cmake@' + ver, type='build', when='@' + ver)
|
|
|
|
|
2020-12-15 06:55:45 -06:00
|
|
|
root_cmakelists_dir = join_path('lib', 'comgr')
|