From 30c9ff50dd048573e3cd7a63a8ab9c05c0bee339 Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Wed, 26 Oct 2022 20:17:32 +0200 Subject: Allow for packages with multiple build-systems (#30738) This commit extends the DSL that can be used in packages to allow declaring that a package uses different build-systems under different conditions. It requires each spec to have a `build_system` single valued variant. The variant can be used in many context to query, manipulate or select the build system associated with a concrete spec. The knowledge to build a package has been moved out of the PackageBase hierarchy, into a new Builder hierarchy. Customization of the default behavior for a given builder can be obtained by coding a new derived builder in package.py. The "run_after" and "run_before" decorators are now applied to methods on the builder. They can also incorporate a "when=" argument to specify that a method is run only when certain conditions apply. For packages that do not define their own builder, forwarding logic is added between the builder and package (methods not found in one will be retrieved from the other); this PR is expected to be fully backwards compatible with unmodified packages that use a single build system. --- share/spack/gitlab/cloud_pipelines/stacks/aws-ahug-aarch64/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml | 2 ++ share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml | 2 ++ 6 files changed, 12 insertions(+) (limited to 'share') diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-ahug-aarch64/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-ahug-aarch64/spack.yaml index 488309b294..5ede7b882c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-ahug-aarch64/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-ahug-aarch64/spack.yaml @@ -24,6 +24,8 @@ spack: - openmpi - mpich variants: +mpi + tbb: + require: "intel-tbb" binutils: variants: +ld +gold +headers +libiberty ~nls version: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml index 61eb974e70..262de722a5 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc-aarch64/spack.yaml @@ -24,6 +24,8 @@ spack: - openmpi - mpich variants: +mpi + tbb: + require: "intel-tbb" binutils: variants: +ld +gold +headers +libiberty ~nls version: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml index ed2f205d42..c71b514c6e 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/aws-isc/spack.yaml @@ -24,6 +24,8 @@ spack: - openmpi - mpich variants: +mpi + tbb: + require: "intel-tbb" binutils: variants: +ld +gold +headers +libiberty ~nls version: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml index ee6c9457c3..b3b4e8697c 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/build_systems/spack.yaml @@ -14,6 +14,8 @@ spack: definitions: - default_specs: + - 'uncrustify build_system=autotools' + - 'uncrustify build_system=cmake' - lz4 # MakefilePackage - mpich~fortran # AutotoolsPackage - py-setuptools # PythonPackage diff --git a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml index 8d6669252a..4d7b875772 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/e4s/spack.yaml @@ -21,6 +21,8 @@ spack: mpi: [mpich] target: [x86_64] variants: +mpi + tbb: + require: "intel-tbb" binutils: variants: +ld +gold +headers +libiberty ~nls cuda: diff --git a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml index ea34141ba1..0090fd2f83 100644 --- a/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml +++ b/share/spack/gitlab/cloud_pipelines/stacks/tutorial/spack.yaml @@ -18,6 +18,8 @@ spack: packages: all: target: [x86_64] + tbb: + require: 'intel-tbb' definitions: - gcc_system_packages: -- cgit v1.2.3-70-g09d2