summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/aocc/package.py
blob: f54b173c7c407377134754e8dcee1829089169ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)


from spack import *


class Aocc(Package):
    '''
    The AOCC compiler system is a high performance,
    production quality code generation tool.
    The AOCC environment provides various options to developers when
    building and optimizing C, C++, and Fortran applications
    targeting 32-bit and 64-bit Linux platforms.
    The AOCC compiler system offers a high level of advanced optimizations,
    multi-threading and processor support that includes global optimization,
    vectorization, inter-procedural analyses, loop transformations,
    and code generation.
    AMD also provides highly optimized libraries,
    which extract the optimal performance from
    each x86 processor core when utilized.
    The AOCC Compiler Suite simplifies and accelerates development and
    tuning for x86 applications.
    Please install only if you agree to terms and conditions depicted
    under : https://developer.amd.com/wordpress/media/files/AOCC_EULA.pdf
    Example for installation: \'spack install aocc +license-agreed\'
    '''
    family = 'compiler'
    homepage = "https://developer.amd.com/amd-aocc/"

    maintainers = ['amd-toolchain-support']

    version(ver="3.1.0", sha256='1948104a430506fe5e445c0c796d6956109e7cc9fc0a1e32c9f1285cfd566d0c',
            url='https://developer.amd.com/wordpress/media/files/aocc-compiler-3.1.0.tar')
    version(ver="3.0.0", sha256='4ff269b1693856b9920f57e3c85ce488c8b81123ddc88682a3ff283979362227',
            url='https://developer.amd.com/wordpress/media/files/aocc-compiler-3.0.0.tar')
    version(ver="2.3.0", sha256='9f8a1544a5268a7fb8cd21ac4bdb3f8d1571949d1de5ca48e2d3309928fc3d15',
            url='https://developer.amd.com/wordpress/media/files/aocc-compiler-2.3.0.tar')
    version(ver="2.2.0", sha256='500940ce36c19297dfba3aa56dcef33b6145867a1f34890945172ac2be83b286',
            url='https://developer.amd.com/wordpress/media/files/aocc-compiler-2.2.0.tar')

    # Licensing
    license_required = True
    license_comment = '#'
    license_files = ['AOCC_EULA.pdf']
    license_url = 'https://developer.amd.com/wordpress/media/files/AOCC_EULA.pdf'
    install_example = "spack install aocc +license-agreed"

    depends_on('libxml2')
    depends_on('zlib')
    depends_on('ncurses')
    depends_on('libtool')
    depends_on('texinfo')

    variant('license-agreed', default=False,
            description='Agree to terms and conditions depicted under : {0}'
            .format(license_url))

    @run_before('install')
    def abort_without_license_agreed(self):
        license_url = 'https://developer.amd.com/wordpress/media/files/AOCC_EULA.pdf'
        install_example = "spack install aocc +license-agreed"
        if not self.spec.variants['license-agreed'].value:
            raise InstallError("\n\n\nNOTE:\nUse +license-agreed " +
                               "during installation " +
                               "to accept terms and conditions " +
                               "depicted under following link \n" +
                               " {0}\n".format(license_url) +
                               "Example: \'{0}\' \n".format(install_example))

    def install(self, spec, prefix):
        print("Installing AOCC Compiler ... ")
        install_tree('.', prefix)