[edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds

Bob Feng posted 1 patch 4 years, 8 months ago
Failed in applying to current master (apply log)
.../Source/Python/Workspace/InfBuildData.py   | 29 ++++++++++---------
1 file changed, 16 insertions(+), 13 deletions(-)
[edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
Posted by Bob Feng 4 years, 8 months ago
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.

Cc: Liming Gao <liming.gao@intel.com>
Signed-off-by: Bob Feng <bob.c.feng@intel.com>
---
 .../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


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46536): https://edk2.groups.io/g/devel/message/46536
Mute This Topic: https://groups.io/mt/33055286/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
Posted by Leif Lindholm 4 years, 8 months ago
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 <liming.gao@intel.com>
> Signed-off-by: Bob Feng <bob.c.feng@intel.com>

Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
Tested-by: Leif Lindholm <leif.lindholm@linaro.org>


> ---
>  .../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
> 
> 
> 
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46543): https://edk2.groups.io/g/devel/message/46543
Mute This Topic: https://groups.io/mt/33055286/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
Posted by Liming Gao 4 years, 8 months ago
Bob:
  This fix is clear. Reviewed-by: Liming Gao <liming.gao@intel.com>

Thanks
Liming
> -----Original Message-----
> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> Sent: Wednesday, August 28, 2019 10:01 PM
> To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>
> Cc: Gao, Liming <liming.gao@intel.com>
> Subject: Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
> 
> 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 <liming.gao@intel.com>
> > Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> 
> Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
> Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
> 
> 
> > ---
> >  .../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
> >
> >
> > 
> >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46544): https://edk2.groups.io/g/devel/message/46544
Mute This Topic: https://groups.io/mt/33055286/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
Posted by Michael D Kinney 4 years, 8 months ago
Hi Bob,

I agree this is a critical regression issue that must
be fixed for the edk2-stable201908 release.

Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>

Thanks,

Mike

> -----Original Message-----
> From: Gao, Liming
> Sent: Wednesday, August 28, 2019 8:22 AM
> To: Leif Lindholm <leif.lindholm@linaro.org>;
> devel@edk2.groups.io; Feng, Bob C
> <bob.c.feng@intel.com>
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>;
> afish@apple.com; Laszlo Ersek (lersek@redhat.com)
> <lersek@redhat.com>
> Subject: RE: [edk2-devel] [Patch][edk2-stable201908]
> BaseTools: Fixed regression issue for building !x86
> builds
> 
> Bob:
>   This fix is clear. Reviewed-by: Liming Gao
> <liming.gao@intel.com>
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> > Sent: Wednesday, August 28, 2019 10:01 PM
> > To: devel@edk2.groups.io; Feng, Bob C
> <bob.c.feng@intel.com>
> > Cc: Gao, Liming <liming.gao@intel.com>
> > Subject: Re: [edk2-devel] [Patch][edk2-stable201908]
> BaseTools: Fixed
> > regression issue for building !x86 builds
> >
> > 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 <liming.gao@intel.com>
> > > Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> >
> > Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
> > Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
> >
> >
> > > ---
> > >  .../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_FEAT
> > URE_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
> > >
> > >
> > > 
> > >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46552): https://edk2.groups.io/g/devel/message/46552
Mute This Topic: https://groups.io/mt/33055286/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
Posted by Bob Feng 4 years, 8 months ago
Pushed at 37eef91017ad042035090cae46557f9d6e2d5917

Thanks,
Bob

-----Original Message-----
From: Kinney, Michael D 
Sent: Thursday, August 29, 2019 2:43 AM
To: Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Cc: afish@apple.com; Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>
Subject: RE: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds

Hi Bob,

I agree this is a critical regression issue that must be fixed for the edk2-stable201908 release.

Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
Acked-by: Michael D Kinney <michael.d.kinney@intel.com>

Thanks,

Mike

> -----Original Message-----
> From: Gao, Liming
> Sent: Wednesday, August 28, 2019 8:22 AM
> To: Leif Lindholm <leif.lindholm@linaro.org>; devel@edk2.groups.io; 
> Feng, Bob C <bob.c.feng@intel.com>
> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; afish@apple.com; 
> Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>
> Subject: RE: [edk2-devel] [Patch][edk2-stable201908]
> BaseTools: Fixed regression issue for building !x86 builds
> 
> Bob:
>   This fix is clear. Reviewed-by: Liming Gao <liming.gao@intel.com>
> 
> Thanks
> Liming
> > -----Original Message-----
> > From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> > Sent: Wednesday, August 28, 2019 10:01 PM
> > To: devel@edk2.groups.io; Feng, Bob C
> <bob.c.feng@intel.com>
> > Cc: Gao, Liming <liming.gao@intel.com>
> > Subject: Re: [edk2-devel] [Patch][edk2-stable201908]
> BaseTools: Fixed
> > regression issue for building !x86 builds
> >
> > 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 <liming.gao@intel.com>
> > > Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> >
> > Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
> > Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
> >
> >
> > > ---
> > >  .../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_FEAT
> > URE_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
> > >
> > >
> > > 
> > >

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46562): https://edk2.groups.io/g/devel/message/46562
Mute This Topic: https://groups.io/mt/33055286/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
Posted by Laszlo Ersek 4 years, 8 months ago
Bob,

On 08/29/19 05:15, Bob Feng wrote:
> Pushed at 37eef91017ad042035090cae46557f9d6e2d5917

If I understand correctly, it remains the case that the BaseTools
behavior -- which has now been restored, with this commit -- does not
match the priority order for lib class resolutions in the DSC specification.

Can you please file a documentation BZ for that?

Since the BaseTools maintainers know the DSC internals best, it would be
great if you could also submit the DSC documentation patch too, for the
new BZ. If you don't have time for that, then please be *very* specific
in the documentation BZ, regarding the actual resolution order -- please
don't just say "replace this with that", but please provide the full
order, for describing the desired (= now-fixed) BaseTools behavior.

Thanks
Laszlo


> -----Original Message-----
> From: Kinney, Michael D 
> Sent: Thursday, August 29, 2019 2:43 AM
> To: Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> Cc: afish@apple.com; Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>
> Subject: RE: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
> 
> Hi Bob,
> 
> I agree this is a critical regression issue that must be fixed for the edk2-stable201908 release.
> 
> Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
> Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
> 
> Thanks,
> 
> Mike
> 
>> -----Original Message-----
>> From: Gao, Liming
>> Sent: Wednesday, August 28, 2019 8:22 AM
>> To: Leif Lindholm <leif.lindholm@linaro.org>; devel@edk2.groups.io; 
>> Feng, Bob C <bob.c.feng@intel.com>
>> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; afish@apple.com; 
>> Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>
>> Subject: RE: [edk2-devel] [Patch][edk2-stable201908]
>> BaseTools: Fixed regression issue for building !x86 builds
>>
>> Bob:
>>   This fix is clear. Reviewed-by: Liming Gao <liming.gao@intel.com>
>>
>> Thanks
>> Liming
>>> -----Original Message-----
>>> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
>>> Sent: Wednesday, August 28, 2019 10:01 PM
>>> To: devel@edk2.groups.io; Feng, Bob C
>> <bob.c.feng@intel.com>
>>> Cc: Gao, Liming <liming.gao@intel.com>
>>> Subject: Re: [edk2-devel] [Patch][edk2-stable201908]
>> BaseTools: Fixed
>>> regression issue for building !x86 builds
>>>
>>> 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 <liming.gao@intel.com>
>>>> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
>>>
>>> Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
>>> Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
>>>
>>>
>>>> ---
>>>>  .../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_FEAT
>>> URE_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
>>>>
>>>>
>>>>
>>>>
> 
> 
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46571): https://edk2.groups.io/g/devel/message/46571
Mute This Topic: https://groups.io/mt/33055286/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-

Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
Posted by Liming Gao 4 years, 8 months ago
Laszlo:

> -----Original Message-----
> From: Laszlo Ersek [mailto:lersek@redhat.com]
> Sent: Thursday, August 29, 2019 10:33 PM
> To: devel@edk2.groups.io; Feng, Bob C <bob.c.feng@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>; Gao, Liming
> <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>
> Cc: afish@apple.com
> Subject: Re: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
> 
> Bob,
> 
> On 08/29/19 05:15, Bob Feng wrote:
> > Pushed at 37eef91017ad042035090cae46557f9d6e2d5917
> 
> If I understand correctly, it remains the case that the BaseTools
> behavior -- which has now been restored, with this commit -- does not
> match the priority order for lib class resolutions in the DSC specification.

Yes. Keep the original behavior. 

> 
> Can you please file a documentation BZ for that?
> 
I just submit BZ https://bugzilla.tianocore.org/show_bug.cgi?id=2141

Thanks
Liming
> Since the BaseTools maintainers know the DSC internals best, it would be
> great if you could also submit the DSC documentation patch too, for the
> new BZ. If you don't have time for that, then please be *very* specific
> in the documentation BZ, regarding the actual resolution order -- please
> don't just say "replace this with that", but please provide the full
> order, for describing the desired (= now-fixed) BaseTools behavior.
> 
> Thanks
> Laszlo
> 
> 
> > -----Original Message-----
> > From: Kinney, Michael D
> > Sent: Thursday, August 29, 2019 2:43 AM
> > To: Gao, Liming <liming.gao@intel.com>; Leif Lindholm <leif.lindholm@linaro.org>; devel@edk2.groups.io; Feng, Bob C
> <bob.c.feng@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
> > Cc: afish@apple.com; Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>
> > Subject: RE: [edk2-devel] [Patch][edk2-stable201908] BaseTools: Fixed regression issue for building !x86 builds
> >
> > Hi Bob,
> >
> > I agree this is a critical regression issue that must be fixed for the edk2-stable201908 release.
> >
> > Tested-by: Michael D Kinney <michael.d.kinney@intel.com>
> > Acked-by: Michael D Kinney <michael.d.kinney@intel.com>
> >
> > Thanks,
> >
> > Mike
> >
> >> -----Original Message-----
> >> From: Gao, Liming
> >> Sent: Wednesday, August 28, 2019 8:22 AM
> >> To: Leif Lindholm <leif.lindholm@linaro.org>; devel@edk2.groups.io;
> >> Feng, Bob C <bob.c.feng@intel.com>
> >> Cc: Kinney, Michael D <michael.d.kinney@intel.com>; afish@apple.com;
> >> Laszlo Ersek (lersek@redhat.com) <lersek@redhat.com>
> >> Subject: RE: [edk2-devel] [Patch][edk2-stable201908]
> >> BaseTools: Fixed regression issue for building !x86 builds
> >>
> >> Bob:
> >>   This fix is clear. Reviewed-by: Liming Gao <liming.gao@intel.com>
> >>
> >> Thanks
> >> Liming
> >>> -----Original Message-----
> >>> From: Leif Lindholm [mailto:leif.lindholm@linaro.org]
> >>> Sent: Wednesday, August 28, 2019 10:01 PM
> >>> To: devel@edk2.groups.io; Feng, Bob C
> >> <bob.c.feng@intel.com>
> >>> Cc: Gao, Liming <liming.gao@intel.com>
> >>> Subject: Re: [edk2-devel] [Patch][edk2-stable201908]
> >> BaseTools: Fixed
> >>> regression issue for building !x86 builds
> >>>
> >>> 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 <liming.gao@intel.com>
> >>>> Signed-off-by: Bob Feng <bob.c.feng@intel.com>
> >>>
> >>> Acked-by: Leif Lindholm <leif.lindholm@linaro.org>
> >>> Tested-by: Leif Lindholm <leif.lindholm@linaro.org>
> >>>
> >>>
> >>>> ---
> >>>>  .../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_FEAT
> >>> URE_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
> >>>>
> >>>>
> >>>>
> >>>>
> >
> > 
> >


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46574): https://edk2.groups.io/g/devel/message/46574
Mute This Topic: https://groups.io/mt/33055286/1787277
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [importer@patchew.org]
-=-=-=-=-=-=-=-=-=-=-=-