From bdaca40fe4ff1d6b5e49f595a82c3a8a6e5da0da Mon Sep 17 00:00:00 2001 From: Florent Kermarrec Date: Fri, 22 Nov 2019 15:28:07 +0100 Subject: [PATCH] build/generic_platform: avoid duplicate in GenericPlatform.sources --- litex/build/generic_platform.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/litex/build/generic_platform.py b/litex/build/generic_platform.py index 772f77a1..65d70665 100644 --- a/litex/build/generic_platform.py +++ b/litex/build/generic_platform.py @@ -325,7 +325,9 @@ class GenericPlatform: language = tools.language_by_filename(filename) if library is None: library = "work" - + for f, _, _ in self.sources: + if f == filename: + return self.sources.append((os.path.abspath(filename), language, library)) def add_sources(self, path, *filenames, language=None, library=None): -- 2.30.2