## Import Modules\r
#\r
from __future__ import print_function\r
+from __future__ import absolute_import\r
import Common.LongFilePathOs as os\r
import re\r
import os.path as path\r
import copy\r
import uuid\r
\r
-import GenC\r
-import GenMake\r
-import GenDepex\r
+from . import GenC\r
+from . import GenMake\r
+from . import GenDepex\r
from io import BytesIO\r
\r
-from StrGather import *\r
-from BuildEngine import BuildRule\r
+from .StrGather import *\r
+from .BuildEngine import BuildRule\r
\r
from Common.LongFilePathSupport import CopyLongFilePath\r
from Common.BuildToolError import *\r
from Workspace.BuildClassObject import *\r
from GenPatchPcdTable.GenPatchPcdTable import parsePcdInfoFromMapFile\r
import Common.VpdInfoFile as VpdInfoFile\r
-from GenPcdDb import CreatePcdDatabaseCode\r
+from .GenPcdDb import CreatePcdDatabaseCode\r
from Workspace.MetaFileCommentParser import UsageList\r
from Workspace.WorkspaceCommon import GetModuleLibInstances\r
from Common.MultipleWorkspace import MultipleWorkspace as mws\r
-import InfSectionParser\r
+from . import InfSectionParser\r
import datetime\r
import hashlib\r
-from GenVar import VariableMgr, var_info\r
+from .GenVar import VariableMgr, var_info\r
from collections import OrderedDict\r
from collections import defaultdict\r
from Workspace.WorkspaceCommon import OrderedListDict\r
DecPcdsKey.add((Pcd[0], Pcd[1], Pcd[2]))\r
\r
Platform.SkuName = self.SkuId\r
- for Name, Guid in PcdSet:\r
+ for Name, Guid,Fileds in PcdSet:\r
if (Name, Guid) not in DecPcds:\r
EdkLogger.error(\r
'build',\r
if (Name, Guid, TAB_PCDS_FIXED_AT_BUILD) in DecPcdsKey \\r
or (Name, Guid, TAB_PCDS_PATCHABLE_IN_MODULE) in DecPcdsKey \\r
or (Name, Guid, TAB_PCDS_FEATURE_FLAG) in DecPcdsKey:\r
- Platform.AddPcd(Name, Guid, PcdSet[Name, Guid])\r
continue\r
elif (Name, Guid, TAB_PCDS_DYNAMIC) in DecPcdsKey or (Name, Guid, TAB_PCDS_DYNAMIC_EX) in DecPcdsKey:\r
EdkLogger.error(\r
FixedAtBuildPcds = {}\r
ShareFixedAtBuildPcdsSameValue = {}\r
for Module in LibAuto._ReferenceModules:\r
- for Pcd in Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds:\r
+ for Pcd in set(Module.FixedAtBuildPcds + LibAuto.FixedAtBuildPcds):\r
+ DefaultValue = Pcd.DefaultValue\r
+ # Cover the case: DSC component override the Pcd value and the Pcd only used in one Lib\r
+ if Pcd in Module.LibraryPcdList:\r
+ Index = Module.LibraryPcdList.index(Pcd)\r
+ DefaultValue = Module.LibraryPcdList[Index].DefaultValue\r
key = ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName))\r
if key not in FixedAtBuildPcds:\r
ShareFixedAtBuildPcdsSameValue[key] = True\r
- FixedAtBuildPcds[key] = Pcd.DefaultValue\r
+ FixedAtBuildPcds[key] = DefaultValue\r
else:\r
- if FixedAtBuildPcds[key] != Pcd.DefaultValue:\r
+ if FixedAtBuildPcds[key] != DefaultValue:\r
ShareFixedAtBuildPcdsSameValue[key] = False\r
for Pcd in LibAuto.FixedAtBuildPcds:\r
key = ".".join((Pcd.TokenSpaceGuidCName, Pcd.TokenCName))\r
def CanSkipbyHash(self):\r
if GlobalData.gUseHashCache:\r
return not self.GenModuleHash()\r
+ return False\r
\r
## Decide whether we can skip the ModuleAutoGen process\r
# If any source file is newer than the module than we cannot skip\r
#\r
def CanSkip(self):\r
+ if self.MakeFileDir in GlobalData.gSikpAutoGenCache:\r
+ return True\r
if not os.path.exists(self.GetTimeStampPath()):\r
return False\r
#last creation time of the module\r
ModuleAutoGen.TimeDict[source] = os.stat(source)[8]\r
if ModuleAutoGen.TimeDict[source] > DstTimeStamp:\r
return False\r
+ GlobalData.gSikpAutoGenCache.add(self.MakeFileDir)\r
return True\r
\r
def GetTimeStampPath(self):\r