From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.151, mailfrom: christian.rodriguez@intel.com) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Thu, 01 Aug 2019 15:57:43 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Aug 2019 15:57:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,336,1559545200"; d="scan'208";a="184396772" Received: from orsmsx105.amr.corp.intel.com ([10.22.225.132]) by orsmga002.jf.intel.com with ESMTP; 01 Aug 2019 15:57:43 -0700 Received: from orsmsx160.amr.corp.intel.com (10.22.226.43) by ORSMSX105.amr.corp.intel.com (10.22.225.132) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 1 Aug 2019 15:57:42 -0700 Received: from orsmsx114.amr.corp.intel.com ([169.254.8.96]) by ORSMSX160.amr.corp.intel.com ([169.254.13.251]) with mapi id 14.03.0439.000; Thu, 1 Aug 2019 15:57:42 -0700 From: "Christian Rodriguez" To: "Feng, Bob C" , "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: AQHVSH536J2tkp7CZU+gomOaKRVizqbm5qtggAABOpA= Date: Thu, 1 Aug 2019 22:57:42 +0000 Message-ID: <3A7DCC9A944C6149BF832E1C9B718ABC01F9B2EC@ORSMSX114.amr.corp.intel.com> References: <20190801153312.886-1-christian.rodriguez@intel.com> <08650203BA1BD64D8AD9B6D5D74A85D160B51796@SHSMSX105.ccr.corp.intel.com> In-Reply-To: <08650203BA1BD64D8AD9B6D5D74A85D160B51796@SHSMSX105.ccr.corp.intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ctpclassification: CTP_NT x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiYjhkODFkMGMtMmM2Zi00YzFmLWFjZDUtNDA1MjI1MmI5ZjdiIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiTFFqMEtDWUhjdnNNNUVFQjZzaStPM1ZOUXpkYjYyQ2NlSDVCUTVCbjJCZHZXVG5hMnRNbEs3MmM0THI5U0JvdiJ9 dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.22.254.140] MIME-Version: 1.0 Return-Path: christian.rodriguez@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 > >Cc: Gao, Liming >Subject: RE: [edk2-devel] [Patch V2] BaseTools: Fix checking for Sources >section in INF file > >Hi Christian and Liming, > >Since this patch changes AutoGen.py, I hope this patch can be created base= d >on Multiple-processes AutoGen patch set, and pushed after Multiple- >processes AutoGen being pushed. > >Thanks, >Bob > > >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Christian Rodriguez >Sent: Thursday, August 1, 2019 11:33 PM >To: devel@edk2.groups.io >Cc: Feng, Bob C ; Gao, Liming > >Subject: [edk2-devel] [Patch V2] BaseTools: Fix checking for Sources secti= on 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 of a= module >is missing the exclusion of source files that fall under the scope of Pack= age >includes. This change adds the exclusions. > >Signed-off-by: Christian Rodriguez >Cc: Bob Feng >Cc: Liming Gao >--- > BaseTools/Source/Python/AutoGen/AutoGen.py | 15 +++++++++++++++ >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 >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): 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 [bob.c.feng@intel.com] >-=3D-=3D-=3D-=3D-=3D-=3D