From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=bWY0znq/; spf=pass (domain: linaro.org, ip: 209.85.128.66, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by groups.io with SMTP; Wed, 28 Aug 2019 07:01:33 -0700 Received: by mail-wm1-f66.google.com with SMTP id f72so163990wmf.5 for ; Wed, 28 Aug 2019 07:01:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=KoYw3zdtSDbfhITHw30r/7mIk56op6PNumnQbKCMELM=; b=bWY0znq/MppQnxhnOMmxarWGMdMz6lZs7CRdt5iE7HpMdH5pHV88MjbC2PX0pjfLqW 113qeICXDBaShiFbPGGPW7PdL3uS79NuMOhFuboPworxllV6e2Fvx2Ue5Lr9+Ijt39V/ Ol/M9FJNTDo//xzg+DhaO4NLeh3d0D7aB+l2cg3wvihnQKWr1cTufuDO5+23KyE1+ntb JlAIhFDmUlmnXUouLnQ0NviUkBlPKjghIGmwPXY1RjaXI3yQpkGo8du1QlfU/swdsc/B EFmGHw4ki8MEJBI1qkJk+AXA7ok8jlErVg4TIOovkz4VGr7d8bOmmHCIeYfXIoB5upHB +lMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=KoYw3zdtSDbfhITHw30r/7mIk56op6PNumnQbKCMELM=; b=eoUHF0RkP4YlKqrY593uXdGCATezVPki3pJOdV93SOt4n7Zr3v9bSL19bgcrHEiC0A Dn7Tq1dvc2yeuQAVZ7YCrD7zh6WxXc7GT8lNLfniNI7dJXFl9ThF2UOJFR+7wkWQJ4/9 KmW7WoxS5q/gj7RvjqLKeKUThEYlE0XjUSwu5EMxW0sMSkqhwTRHU7tDjiy3H4/yPLly r7mWg6Y8mR6eWK61vepzSXj6wL0uF0uHvH7orlEbZLzMvSY2A4CXqXWO6KMbOBi06GmZ PsPUw7PrUo/hVsEKCx87NSBdkWQTQU+xzuGO6iKdfVWBStCYQoIzVkBNLpVKJvO6QcN5 ilTQ== X-Gm-Message-State: APjAAAW0uAUecLvnml1jJSmQ6I36cgh29NGEFyTn4ilw61SO3ucGiY6h VgNd8I+ai8T2+YNGerWliCvKsqFMQGk= X-Google-Smtp-Source: APXvYqxdkvVvmotQnVNtBdnAhHSprxKtPuWfvuqZcSj3w4yPPFQfMwukFLvYHDBMwMJfXtFBFGd9+g== X-Received: by 2002:a1c:e710:: with SMTP id e16mr5289707wmh.38.1567000891139; Wed, 28 Aug 2019 07:01:31 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id u6sm3079094wrr.26.2019.08.28.07.01.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Aug 2019 07:01:30 -0700 (PDT) Date: Wed, 28 Aug 2019 15:01:29 +0100 From: "Leif Lindholm" To: devel@edk2.groups.io, bob.c.feng@intel.com Cc: Liming Gao Subject: Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds Message-ID: <20190828140129.GJ29255@bivouac.eciton.net> References: <20190828091710.22372-1-bob.c.feng@intel.com> MIME-Version: 1.0 In-Reply-To: <20190828091710.22372-1-bob.c.feng@intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Wed, Aug 28, 2019 at 05:17:10PM +0800, Bob Feng wrote: > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=2134 > > This patch is to fix a build tool regression issue which > was introduced by commit e8449e1d8e. > > In commit e8449e1d8e, build tool check the pcd before > filter out the irrelevant library instance. > > The logic of evaluating the priority of the library class > resolutions was not changed. Ah, OK, that greatly simplifies things. This resolves the issue(s) for me - thanks! > Cc: Liming Gao > Signed-off-by: Bob Feng Acked-by: Leif Lindholm Tested-by: Leif Lindholm > --- > .../Source/Python/Workspace/InfBuildData.py | 29 ++++++++++--------- > 1 file changed, 16 insertions(+), 13 deletions(-) > > diff --git a/BaseTools/Source/Python/Workspace/InfBuildData.py b/BaseTools/Source/Python/Workspace/InfBuildData.py > index e63246b03b..7675b0ea00 100644 > --- a/BaseTools/Source/Python/Workspace/InfBuildData.py > +++ b/BaseTools/Source/Python/Workspace/InfBuildData.py > @@ -154,12 +154,11 @@ class InfBuildData(ModuleBuildClassObject): > self._PcdComments = None > self._BuildOptions = None > self._DependencyFileList = None > self.LibInstances = [] > self.ReferenceModules = set() > - self.Guids > - self.Pcds > + > def SetReferenceModule(self,Module): > self.ReferenceModules.add(Module) > return self > > ## XXX[key] = value > @@ -654,10 +653,24 @@ class InfBuildData(ModuleBuildClassObject): > "Value of Guid [%s] is not found under [Guids] section in" % CName, > ExtraData=PackageList, File=self.MetaFile, Line=Record[-1]) > RetVal[CName] = Value > CommentRecords = self._RawData[MODEL_META_DATA_COMMENT, self._Arch, self._Platform, Record[5]] > self._GuidComments[CName] = [a[0] for a in CommentRecords] > + > + for Type in [MODEL_PCD_FIXED_AT_BUILD,MODEL_PCD_PATCHABLE_IN_MODULE,MODEL_PCD_FEATURE_FLAG,MODEL_PCD_DYNAMIC,MODEL_PCD_DYNAMIC_EX]: > + RecordList = self._RawData[Type, self._Arch, self._Platform] > + for TokenSpaceGuid, _, _, _, _, _, LineNo in RecordList: > + # get the guid value > + if TokenSpaceGuid not in RetVal: > + Value = GuidValue(TokenSpaceGuid, self.Packages, self.MetaFile.Path) > + if Value is None: > + PackageList = "\n\t".join(str(P) for P in self.Packages) > + EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, > + "Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid, > + ExtraData=PackageList, File=self.MetaFile, Line=LineNo) > + RetVal[TokenSpaceGuid] = Value > + self._GuidsUsedByPcd[TokenSpaceGuid] = Value > return RetVal > > ## Retrieve include paths necessary for this module (for Edk.x style of modules) > @cached_property > def Includes(self): > @@ -856,11 +869,11 @@ class InfBuildData(ModuleBuildClassObject): > if file_name.upper().endswith("DEC"): > pkg = os.path.join(TopDir,file_name) > return pkg > @cached_class_function > def GetGuidsUsedByPcd(self): > - self.Pcds > + self.Guid > return self._GuidsUsedByPcd > > ## Retrieve PCD for given type > def _GetPcd(self, Type): > Pcds = OrderedDict() > @@ -868,20 +881,10 @@ class InfBuildData(ModuleBuildClassObject): > PcdList = [] > RecordList = self._RawData[Type, self._Arch, self._Platform] > for TokenSpaceGuid, PcdCName, Setting, Arch, Platform, Id, LineNo in RecordList: > PcdDict[Arch, Platform, PcdCName, TokenSpaceGuid] = (Setting, LineNo) > PcdList.append((PcdCName, TokenSpaceGuid)) > - # get the guid value > - if TokenSpaceGuid not in self.Guids: > - Value = GuidValue(TokenSpaceGuid, self.Packages, self.MetaFile.Path) > - if Value is None: > - PackageList = "\n\t".join(str(P) for P in self.Packages) > - EdkLogger.error('build', RESOURCE_NOT_AVAILABLE, > - "Value of Guid [%s] is not found under [Guids] section in" % TokenSpaceGuid, > - ExtraData=PackageList, File=self.MetaFile, Line=LineNo) > - self.Guids[TokenSpaceGuid] = Value > - self._GuidsUsedByPcd[TokenSpaceGuid] = Value > CommentRecords = self._RawData[MODEL_META_DATA_COMMENT, self._Arch, self._Platform, Id] > Comments = [] > for CmtRec in CommentRecords: > Comments.append(CmtRec[0]) > self._PcdComments[TokenSpaceGuid, PcdCName] = Comments > -- > 2.20.1.windows.1 > > > >