mirror of
				https://github.com/acidanthera/audk.git
				synced 2025-10-31 03:03:46 +01:00 
			
		
		
		
	BaseTools: PCD can only use single access method by source build
Add the error check that A PCD can only use one type for all source modules. Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
		
							parent
							
								
									0c79471d6a
								
							
						
					
					
						commit
						97cdb33b57
					
				| @ -504,6 +504,22 @@ class WorkspaceAutoGen(AutoGen): | |||||||
|                                 SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName)) |                                 SourcePcdDict['FixedAtBuild'].append((BuildData.Pcds[key].TokenCName, BuildData.Pcds[key].TokenSpaceGuidCName)) | ||||||
|                 else: |                 else: | ||||||
|                     pass |                     pass | ||||||
|  |             # | ||||||
|  |             # A PCD can only use one type for all source modules | ||||||
|  |             # | ||||||
|  |             for i in SourcePcdDict_Keys: | ||||||
|  |                 for j in SourcePcdDict_Keys: | ||||||
|  |                     if i != j: | ||||||
|  |                         IntersectionList = list(set(SourcePcdDict[i]).intersection(set(SourcePcdDict[j]))) | ||||||
|  |                         if len(IntersectionList) > 0: | ||||||
|  |                             EdkLogger.error( | ||||||
|  |                             'build', | ||||||
|  |                             FORMAT_INVALID, | ||||||
|  |                             "Building modules from source INFs, following PCD use %s and %s access method. It must be corrected to use only one access method." % (i, j), | ||||||
|  |                             ExtraData="%s" % '\n\t'.join([str(P[1]+'.'+P[0]) for P in IntersectionList]) | ||||||
|  |                             ) | ||||||
|  |                     else: | ||||||
|  |                         pass | ||||||
| 
 | 
 | ||||||
|             # |             # | ||||||
|             # intersection the BinaryPCD for Mixed PCD |             # intersection the BinaryPCD for Mixed PCD | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user