mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1472490 - Make adding a source to SOURCES, UNIFIED_SOURCES, or HOST_SOURCES multiple times an error in moz.build. r=gps
MozReview-Commit-ID: FtPF3dxUxb5 --HG-- extra : rebase_source : ad380999c41830ea0f088bdacf5fc04c95783f04
This commit is contained in:
parent
dbf1f2b689
commit
d6b368dff1
@ -849,7 +849,12 @@ class TreeMetadataEmitter(LoggingMixin):
|
||||
srcs = sources[symbol]
|
||||
gen_srcs = gen_sources[symbol]
|
||||
context_srcs = context.get(symbol, [])
|
||||
seen_sources = set()
|
||||
for f in context_srcs:
|
||||
if f in seen_sources:
|
||||
raise SandboxValidationError('Source file should only '
|
||||
'be added to %s once: %s' % (symbol, f), context)
|
||||
seen_sources.add(f)
|
||||
full_path = f.full_path
|
||||
if isinstance(f, SourcePath):
|
||||
srcs.append(full_path)
|
||||
|
Loading…
Reference in New Issue
Block a user