diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py index 432b9bab2fd..c7b4b5651dc 100644 --- a/lib/spack/spack/spec.py +++ b/lib/spack/spack/spec.py @@ -3554,10 +3554,6 @@ 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()