From f4dfec6ca1ef4354307b8ca8005affe17fc64360 Mon Sep 17 00:00:00 2001 From: "Li, Yi1" Date: Mon, 18 Apr 2022 16:15:21 +0800 Subject: BaseTools: Move gPlatformFinalPcd to Datapipe and optimize size REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3828 This is a bugfix of bf9230a9f3dde065c3c8b4175ccd32e44e8f0362. 1.In the current code, gPlatformFinalPcd will save all PCDs used at whole compile process, which wastes runtime memory and is unnecessary. This patch makes gPlatformFinalPcd save only the PCDes which are assigned in the DSC file, and the PCD that has not been assigned will use the default value in DEC. 2.During the compilation process, gPlatformFinalPcd may be lost, and the current code cannot selectively assign PCD in DSC by specifying ARCH. This patch moves gPlatformFinalPcd into datapipe and modifies the assignment logicto fix this. Cc: Bob Feng Cc: Liming Gao Signed-off-by: yi1 li Reviewed-by: Bob Feng --- BaseTools/Source/Python/AutoGen/AutoGenWorker.py | 1 + 1 file changed, 1 insertion(+) (limited to 'BaseTools/Source/Python/AutoGen/AutoGenWorker.py') diff --git a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py index eea15239d4..0ba2339bed 100755 --- a/BaseTools/Source/Python/AutoGen/AutoGenWorker.py +++ b/BaseTools/Source/Python/AutoGen/AutoGenWorker.py @@ -216,6 +216,7 @@ class AutoGenWorkerInProcess(mp.Process): GlobalData.gModuleHashFile = dict() GlobalData.gFileHashDict = dict() GlobalData.gEnableGenfdsMultiThread = self.data_pipe.Get("EnableGenfdsMultiThread") + GlobalData.gPlatformFinalPcds = self.data_pipe.Get("gPlatformFinalPcds") GlobalData.file_lock = self.file_lock CommandTarget = self.data_pipe.Get("CommandTarget") pcd_from_build_option = [] -- cgit v1.2.3