From 45e1573a17a497f717791847acfbac12cdf1c145 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 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 95d14279dc5..d6461752573 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3544,6 +3544,10 @@ def _dup(self, other, deps: Union[bool, dt.DepTypes, dt.DepFlag] = True, clearde if cleardeps: self._dependents = _EdgeMap(store_by_child=False) self._dependencies = _EdgeMap(store_by_child=True) + + 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()