diff options
Diffstat (limited to 'var/spack/repos/builtin/packages/hsa-rocr-dev/package.py')
-rw-r--r-- | var/spack/repos/builtin/packages/hsa-rocr-dev/package.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py index 5ca7b8253d..9b82354dc1 100644 --- a/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py +++ b/var/spack/repos/builtin/packages/hsa-rocr-dev/package.py @@ -20,6 +20,7 @@ class HsaRocrDev(CMakePackage): maintainers = ['srekolam', 'arjun-raj-kuppala'] version('master', branch='master') + version('4.2.0', sha256='fa0e7bcd64e97cbff7c39c9e87c84a49d2184dc977b341794770805ec3f896cc') version('4.1.0', sha256='c223a5f7ccac280520abb6ea49fdd36fa9468718098a9d984be6ef839ccbc6db') version('4.0.0', sha256='e84c48e80ea38698a5bd5da3940048ad3cab3696d10a53132acad07ca357f17c') version('3.10.0', sha256='58866d8acdb6cc45227f2412098e37c65908b20ed3dd54901dfb515c15ad5f71') @@ -29,15 +30,18 @@ class HsaRocrDev(CMakePackage): version('3.5.0', sha256='52c12eec3e3404c0749c70f156229786ee0c3e6d3c979aed9bbaea500fa1f3b8') variant('build_type', default='Release', values=("Release", "Debug"), description='CMake build type') + variant('shared', default=True, description='Build shared or static library') + variant('image', default=True, description='build with or without image support') depends_on('cmake@3:', type="build") depends_on('libelf@0.8:', type='link') for ver in ['3.5.0', '3.7.0', '3.8.0', '3.9.0', '3.10.0', '4.0.0', '4.1.0', - 'master']: + '4.2.0', 'master']: depends_on('hsakmt-roct@' + ver, type=('link', 'run'), when='@' + ver) - for ver in ['3.7.0', '3.8.0', '3.9.0', '4.0.0', '4.1.0', 'master']: + depends_on('rocm-device-libs@' + ver, type=('build', 'link'), when='@' + ver) + + for ver in ['3.7.0', '3.8.0', '3.9.0', '4.0.0', '4.1.0', '4.2.0', 'master']: depends_on('llvm-amdgpu@' + ver, type=('link', 'run'), when='@' + ver) - depends_on('rocm-device-libs@' + ver, type=('link', 'run'), when='@' + ver) # Both 3.5.0 and 3.7.0 force INSTALL_RPATH in different ways patch('0001-Do-not-set-an-explicit-rpath-by-default-since-packag.patch', when='@3.5.0') @@ -49,7 +53,13 @@ class HsaRocrDev(CMakePackage): libelf_include = self.spec['libelf'].prefix.include.libelf args = ['-DLIBELF_INCLUDE_DIRS=%s' % libelf_include] + self.define_from_variant('BUILD_SHARED_LIBS', 'shared') + if '@3.7.0:' in self.spec: - args.append('-DIMAGE_SUPPORT=ON') + self.define_from_variant('IMAGE_SUPPORT', 'image') + + if '@4.2.0:' in self.spec: + bitcode_dir = self.spec['rocm-device-libs'].prefix.amdgcn.bitcode + args.append('-DBITCODE_DIR={0}'.format(bitcode_dir)) return args |