From nobody Sat May 18 11:26:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+44691+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44691+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1564596067; cv=none; d=zoho.com; s=zohoarc; b=ARSxwfbgq5+NRYHv6Q1vDbiGWB/hfDuZyssTHd9r4Te8QyaoHBUZt/4vCKUZZ8kQFAhsV3CoI1VVoOTr8cFVMtrCQ9BNmOrS/Pr1TFNC6vKOmXkATFbU8NguUs5Kc50XA2nokoZjmdGW9XLxWnIp7IHGxjAidx6jTH2J+3LHdBs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1564596067; h=Content-Transfer-Encoding:Cc:Date:From:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Sender:Subject:To:ARC-Authentication-Results; bh=EornCc6UXKCtn4GiU/WXsFzSNdxvsb0M2BqgTBegDWo=; b=JbAV60O8/L749yeUUFN9ecN1MUqR6hqBfI7FsEkpp7N7+Posp8BwS8faUFbCsyIKw0o5hENi3HfBoJ36WwC1hGNYX7CKSsYzDlvKD2loRf9yUXqsjGxSQ9269+W5+8LgY5Ya56lr0mheBAq0atP293LT9ze4Yb1dljRYBudCtGU= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+44691+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1564596067185689.9775090038928; Wed, 31 Jul 2019 11:01:07 -0700 (PDT) Return-Path: X-Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by groups.io with SMTP; Wed, 31 Jul 2019 11:01:05 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga007.jf.intel.com ([10.7.209.58]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 31 Jul 2019 11:01:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,330,1559545200"; d="scan'208";a="163202065" X-Received: from rodrigu3-desk.amr.corp.intel.com ([10.7.145.59]) by orsmga007.jf.intel.com with ESMTP; 31 Jul 2019 11:01:04 -0700 From: "Christian Rodriguez" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao Subject: [edk2-devel] [PATCH] BaseTools: Fix checking for Sources section in INF file Date: Wed, 31 Jul 2019 11:01:01 -0700 Message-Id: <20190731180101.613-1-christian.rodriguez@intel.com> MIME-Version: 1.0 Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,christian.rodriguez@intel.com Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1564596066; bh=5T0BXFSK+INDE/pyEbouEXJ6URfCrXZ2B3eryLkPXl4=; h=Cc:Date:From:Reply-To:Subject:To; b=XgGlY6b39u0xlqP74l4Ks/ddLIswQJHQWPHxKW5Dq9pZ2eEkzRDL4YQxYR/MWl8sotx jHgXm4WpsFlo5UuexgnIglxVariUpUthMR8LdVFeJGajl+l8au+BuSClvxasDvumc7mV/ p2vER4WHN+4EcwvAvczjWXsxlCco+shFEw8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" 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 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 +++++++++++++++ BaseTools/Source/Python/AutoGen/GenMake.py | 15 ++++++++++++--- 2 files changed, 27 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) =20 + ## Get the list of include paths from the packages + # + # @IncludesList list The list path + # + @cached_property + def PackageIncludePathList(self): + IncludesList =3D [] + for Package in self.Module.Packages: + PackageDir =3D mws.join(self.WorkspaceDir, Package.MetaFile.Di= r) + IncludesList =3D Package.Includes + if Package._PrivateIncludes: + if not self.MetaFile.Path.startswith(PackageDir): + IncludesList =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 PCDs diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index 5802ae5ae4..8dd08201aa 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 ) =20 + # Get a set of unique package includes from MetaFile + parentMetaFileIncludes =3D set() + for aInclude in self._AutoGenObject.PackageIncludePathList: + aIncludeName =3D str(aInclude) + parentMetaFileIncludes.add(aIncludeName.lower()) + # Check if header 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 from MetaFile headerFilesInMetaFileSet =3D set() for aFile in self._AutoGenObject.SourceFileList: aFileName =3D str(aFile) @@ -915,24 +921,27 @@ cleanlib: continue headerFilesInMetaFileSet.add(aFileName.lower()) =20 - # 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()) =20 - # Get a list of unique module dependency header files + # Get a set of unique module dependency header files # Exclude autogen files and files not in the source directory headerFileDependencySet =3D set() localSourceDir =3D str(self._AutoGenObject.SourceDir).lower() for Dependency in FileDependencyDict.values(): for aFile in Dependency: aFileName =3D str(aFile).lower() + aFileDirectory =3D os.path.dirname(aFileName) if not aFileName.endswith('.h'): continue if aFileName in localAutoGenFileSet: continue if localSourceDir not in aFileName: continue + if aFileDirectory in parentMetaFileIncludes: + continue headerFileDependencySet.add(aFileName) =20 # Ensure that gModuleBuildTracking has been initialized per archit= ecture --=20 2.22.0.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#44691): https://edk2.groups.io/g/devel/message/44691 Mute This Topic: https://groups.io/mt/32669900/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-