scons: Copy the value of "tags" before adding "add_tags" to it.

Otherwise the tags in "add_tags" are added into the original, modifying
it for the caller.

Change-Id: I6a82168d54f80ec9f919825edebe7f0ef154c5ae
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/51830
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Maintainer: Gabe Black <gabe.black@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Gabe Black
2021-10-20 09:06:24 -07:00
parent 535963c2d0
commit 645e315180

View File

@@ -201,7 +201,7 @@ class SourceFile(object, metaclass=SourceMeta):
tags = { tags }
if not isinstance(tags, set):
tags = set(tags)
self.tags = tags
self.tags = tags.copy()
if add_tags:
if isinstance(add_tags, str):