From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.65, mailfrom: bob.c.feng@intel.com) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by groups.io with SMTP; Thu, 01 Aug 2019 16:06:25 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 16:06:25 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,336,1559545200"; d="scan'208";a="348248666" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga005.jf.intel.com with ESMTP; 01 Aug 2019 16:06:24 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 1 Aug 2019 16:06:24 -0700 Received: from shsmsx153.ccr.corp.intel.com (10.239.6.53) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 1 Aug 2019 16:06:23 -0700 Received: from shsmsx105.ccr.corp.intel.com ([169.254.11.15]) by SHSMSX153.ccr.corp.intel.com ([169.254.12.215]) with mapi id 14.03.0439.000; Fri, 2 Aug 2019 07:06:21 +0800 From: "Bob Feng" To: "Rodriguez, Christian" , "devel@edk2.groups.io" CC: "Gao, Liming" Subject: Re: [edk2-devel] [Patch V2] BaseTools: Fix checking for Sources section in INF file Thread-Topic: [edk2-devel] [Patch V2] BaseTools: Fix checking for Sources section in INF file Thread-Index: AQHVSH53QAeYQPrBb0Oi6m86t0Ocoqbm5qtg//97SACAAIgRIA== Date: Thu, 1 Aug 2019 23:06:21 +0000 Message-ID: <08650203BA1BD64D8AD9B6D5D74A85D160B517EA@SHSMSX105.ccr.corp.intel.com> References: <20190801153312.886-1-christian.rodriguez@intel.com> <08650203BA1BD64D8AD9B6D5D74A85D160B51796@SHSMSX105.ccr.corp.intel.com> <3A7DCC9A944C6149BF832E1C9B718ABC01F9B2EC@ORSMSX114.amr.corp.intel.com> In-Reply-To: <3A7DCC9A944C6149BF832E1C9B718ABC01F9B2EC@ORSMSX114.amr.corp.intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjhkODFkMGMtMmM2Zi00YzFmLWFjZDUtNDA1MjI1MmI5ZjdiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTFFqMEtDWUhjdnNNNUVFQjZzaStPM1ZOUXpkYjYyQ2NlSDVCUTVCbjJCZHZXVG5hMnRNbEs3MmM0THI5U0JvdiJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.0.600.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: bob.c.feng@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Thanks, I add BZ 1875 as the dependency of BZ 1804. -----Original Message----- From: Rodriguez, Christian=20 Sent: Friday, August 2, 2019 6:58 AM To: Feng, Bob C ; devel@edk2.groups.io Cc: Gao, Liming Subject: RE: [edk2-devel] [Patch V2] BaseTools: Fix checking for Sources se= ction in INF file Yes that can be done. Please add the BZ dependency on Bugzilla. Thanks, Christian >-----Original Message----- >From: Feng, Bob C >Sent: Thursday, August 1, 2019 3:57 PM >To: devel@edk2.groups.io; Rodriguez, Christian=20 > >Cc: Gao, Liming >Subject: RE: [edk2-devel] [Patch V2] BaseTools: Fix checking for=20 >Sources section in INF file > >Hi Christian and Liming, > >Since this patch changes AutoGen.py, I hope this patch can be created=20 >based on Multiple-processes AutoGen patch set, and pushed after=20 >Multiple- processes AutoGen being pushed. > >Thanks, >Bob > > >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of=20 >Christian Rodriguez >Sent: Thursday, August 1, 2019 11:33 PM >To: devel@edk2.groups.io >Cc: Feng, Bob C ; Gao, Liming=20 > >Subject: [edk2-devel] [Patch V2] BaseTools: Fix checking for Sources=20 >section in INF file > >BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1804 > >The check to see if [Sources] section lists all the header type files=20 >of a module is missing the exclusion of source files that fall under=20 >the scope of Package includes. This change adds the exclusions. > >Signed-off-by: Christian Rodriguez >Cc: Bob Feng >Cc: Liming Gao >--- > BaseTools/Source/Python/AutoGen/AutoGen.py | 15 +++++++++++++++=20 >BaseTools/Source/Python/AutoGen/GenMake.py | 25 >++++++++++++++++++++++--- > 2 files changed, 37 insertions(+), 3 deletions(-) > >diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py >b/BaseTools/Source/Python/AutoGen/AutoGen.py >index 2df055a109..02bf58160b 100644 >--- a/BaseTools/Source/Python/AutoGen/AutoGen.py >+++ b/BaseTools/Source/Python/AutoGen/AutoGen.py >@@ -3454,6 +3454,21 @@ class ModuleAutoGen(AutoGen): > def IncludePathLength(self): return sum(len(inc)+1 for inc in >self.IncludePathList) + ## Get the list of include paths from the packa= ges+ >#+ # @IncludesList list The list path+ #+ @cach= ed_property+ >def PackageIncludePathList(self):+ IncludesList =3D []+ for = Package in >self.Module.Packages:+ PackageDir =3D mws.join(self.WorkspaceDi= r, >Package.MetaFile.Dir)+ IncludesList =3D Package.Includes+ = if >Package._PrivateIncludes:+ if not >self.MetaFile.Path.startswith(PackageDir):+ IncludesLis= t =3D >list(set(Package.Includes).difference(set(Package._PrivateIncludes)))+ >return IncludesList+ ## Get HII EX PCDs which maybe used by VFR # = # >efivarstore used by VFR may relate with HII EX PCDsdiff --git=20 >a/BaseTools/Source/Python/AutoGen/GenMake.py >b/BaseTools/Source/Python/AutoGen/GenMake.py >index 5802ae5ae4..1df55e5d61 100644 >--- a/BaseTools/Source/Python/AutoGen/GenMake.py >+++ b/BaseTools/Source/Python/AutoGen/GenMake.py >@@ -906,8 +906,14 @@ cleanlib: > self._AutoGenObject.IncludePathList + >self._AutoGenObject.BuildOptionIncPathList = ) + # Get a >set of unique package includes from MetaFile+ parentMetaFileInclude= s =3D >set()+ for aInclude in self._AutoGenObject.PackageIncludePathList:+ >aIncludeName =3D str(aInclude)+ >parentMetaFileIncludes.add(aIncludeName.lower())+ # Check if heade= r >files are listed in metafile- # Get a list of unique module header = source files >from MetaFile+ # Get a set of unique module header source files fro= m >MetaFile headerFilesInMetaFileSet =3D set() for aFile in >self._AutoGenObject.SourceFileList: aFileName =3D str(aFile)@@= -915,24 >+921,37 @@ cleanlib: > continue headerFilesInMetaFileSet.add(aFileNa= me.lower()) - ># Get a list of unique module autogen files+ # Get a set of unique = module >autogen files localAutoGenFileSet =3D set() for aFile in >self._AutoGenObject.AutoGenFileList: >localAutoGenFileSet.add(str(aFile).lower()) - # Get a list of uniqu= e module >dependency header files+ # Get a set of unique module dependency >header files # Exclude autogen files and files not in the source d= irectory+ ># and files that are under the package include list >headerFileDependencySet =3D set() localSourceDir =3D >str(self._AutoGenObject.SourceDir).lower() for Dependency in >FileDependencyDict.values(): for aFile in Dependency: >aFileName =3D str(aFile).lower()+ # Exclude non-header file= s if >not aFileName.endswith('.h'): continue+ = # Exclude autogen >files if aFileName in localAutoGenFileSet: = continue+ ># Exclude include out of local scope if localSourceDir not= in aFileName: >continue+ # Exclude files covered by package includes+ >pathNeeded =3D True+ for aIncludePath in parentMetaFileIncl= udes:+ >if aIncludePath in aFileName:+ pathNeeded =3D False= + >break+ if not pathNeeded:+ continue+ = # Keep the file >headerFileDependencySet.add(aFileName) # Ensure that >gModuleBuildTracking has been initialized per architecture-- >2.22.0.windows.1 > > >-=3D-=3D-=3D-=3D-=3D-=3D >Groups.io Links: You receive all messages sent to this group. > >View/Reply Online (#44799):=20 >https://edk2.groups.io/g/devel/message/44799 >Mute This Topic: https://groups.io/mt/32680387/1768742 >Group Owner: devel+owner@edk2.groups.io >Unsubscribe: https://edk2.groups.io/g/devel/unsub =20 >[bob.c.feng@intel.com] -=3D-=3D-=3D-=3D-=3D-=3D