From f729353ac313b4557bd1531ea61d019c5051881b Mon Sep 17 00:00:00 2001 From: Massimiliano Culpo Date: Sat, 12 Oct 2024 19:30:10 +0200 Subject: [PATCH] fixup: spec copies compiler annotation Signed-off-by: Massimiliano Culpo --- lib/spack/spack/spec.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 01e5bd958a4..7c85e6aa87f 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3456,6 +3456,9 @@ def _dup(self, other: "Spec", deps: Union[bool, dt.DepTypes, dt.DepFlag] = True) self.name = other.name self.versions = other.versions.copy() self.architecture = other.architecture.copy() if other.architecture else None + if hasattr(other, "compiler_annotation"): + self.compiler_annotation = other.compiler_annotation + self.compiler_flags = other.compiler_flags.copy() self.compiler_flags.spec = self self.variants = other.variants.copy()