From c86b3da9a94b6d2594f72e16ec7d3a1558c36359 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 377e43763d6..09710489212 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3442,6 +3442,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()