diff options
Diffstat (limited to 'var/spack/repos/compiler_runtime.test/packages/gcc')
-rw-r--r-- | var/spack/repos/compiler_runtime.test/packages/gcc/package.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/var/spack/repos/compiler_runtime.test/packages/gcc/package.py b/var/spack/repos/compiler_runtime.test/packages/gcc/package.py new file mode 100644 index 0000000000..db81066599 --- /dev/null +++ b/var/spack/repos/compiler_runtime.test/packages/gcc/package.py @@ -0,0 +1,32 @@ +# Copyright 2013-2023 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.package import * + + +class Gcc(Package): + homepage = "http://www.example.com/" + has_code = False + + version("13.2.0") + version("12.3.0") + + @classmethod + def runtime_constraints(cls, *, compiler, pkg): + pkg("*").depends_on( + "gcc-runtime", + when="%gcc", + type="link", + description="If any package uses %gcc, it depends on gcc-runtime", + ) + pkg("*").depends_on( + f"gcc-runtime@{str(compiler.version)}:", + when=f"%{str(compiler.spec)}", + type="link", + description=f"If any package uses %{str(compiler.spec)}, " + f"it depends on gcc-runtime@{str(compiler.version)}:", + ) + # The version of gcc-runtime is the same as the %gcc used to "compile" it + pkg("gcc-runtime").requires(f"@={str(compiler.version)}", when=f"%{str(compiler.spec)}") |