From nobody Mon Feb 9 19:06:06 2026 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+41337+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+41337+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1558708833; cv=none; d=zoho.com; s=zohoarc; b=hzTrl+SWp9yJsQs4jpdJKAxtACKKXPX9sLK84yWqOa4SHO9PghdoSQdsb5lmKdOZVxHVlD6OkXgfuWRvMQ2GWi69dL9E47bOI+cYx9EjSoSQy9dZRfWxkQcxKA7uhcHSkRbXh7ak2qv3puxLB+FTW2d4PT9MVRftJ1LFQTrUmUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1558708833; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=qcKW0FfdKzZZPvFK3UfYaB89/aKSyPEpY1y/E4qfDLM=; b=XiYZ+ISNZnpIwtIyQLrKfl6gKvYFzQQHDiHBSoDVx64Lsgxbif1PqSa4d7t8/6qdVxuIoRPpDc2IZokVcAKM1m9tz4oZt8AIikNGZyNhVjXKg1dslEjwVCHzrLJW3OukBbzryBSIxKmaM8wTRY9btQ2wZGa79bY/t7EsEJayU14= 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+41337+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 155870883340381.0097865538437; Fri, 24 May 2019 07:40:33 -0700 (PDT) Return-Path: X-Received: from mga11.intel.com (mga11.intel.com []) by groups.io with SMTP; Fri, 24 May 2019 07:40:32 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP; 24 May 2019 07:40:31 -0700 X-ExtLoop1: 1 X-Received: from rodrigu3-desk.amr.corp.intel.com ([10.7.163.75]) by orsmga008.jf.intel.com with ESMTP; 24 May 2019 07:40:31 -0700 From: "Christian Rodriguez" To: devel@edk2.groups.io Cc: Bob Feng , Liming Gao , Yonghong Zhu Subject: [edk2-devel] [Patch V3 1/2] BaseTools: Add a checking for Sources section in INF file [Part 1/2] Date: Fri, 24 May 2019 07:40:26 -0700 Message-Id: <20190524144027.9552-2-christian.rodriguez@intel.com> In-Reply-To: <20190524144027.9552-1-christian.rodriguez@intel.com> References: <20190524144027.9552-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=1558708832; bh=FR/LTa1vf/SjSOHMhIJ8nh9wIeanRlg9wF0LQcodweQ=; h=Cc:Date:From:Reply-To:Subject:To; b=I49f7fsLB88PiMIjsvwbeTM8PT9X6AEzKrSzqK8Q3OOs4+nR3sgcevRpnfAbG/hTzHK RGowvTA+lnn6xgB7KvN0FuKb4aAQ57ohlE/4denTvzcY63+VE/VB4SygVVhX2ZGnJEy/m OhNWRQ5yjmklr87i29ZYIiZp2vWBdhuL1x8= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1804 In V3: Seperate checker and hashing into individual patches In V2: Enable check for all builds, move conditional to hash invalidation In the Edk2 INF spec 3.9, it states, All HII Unicode format files must be listed in [Sources] section. Add a check to see if [Sources] section lists all the "source" type files of a module. Performance impact should be minimal with this patch since information is already being fetched for Makefile purposes. All other information is already cached in memory. No extra IO time is needed. Part 1 is checker only. Signed-off-by: Christian Rodriguez Cc: Bob Feng Cc: Liming Gao Cc: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/GenMake.py | 38 ++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/= Python/AutoGen/GenMake.py index 0e0f9fd9b0..5c992d7c26 100644 --- a/BaseTools/Source/Python/AutoGen/GenMake.py +++ b/BaseTools/Source/Python/AutoGen/GenMake.py @@ -905,6 +905,44 @@ cleanlib: ForceIncludedFile, self._AutoGenObject.IncludePathList + = self._AutoGenObject.BuildOptionIncPathList ) + + # Check if header files are listed in metafile + # Get a list of unique module header source files from MetaFile + headerFilesInMetaFileSet =3D set() + for aFile in self._AutoGenObject.SourceFileList: + aFileName =3D str(aFile) + if not aFileName.endswith('.h'): + continue + headerFilesInMetaFileSet.add(aFileName.lower()) + + # Get a list of unique module autogen files + localAutoGenFileSet =3D set() + for aFile in self._AutoGenObject.AutoGenFileList: + localAutoGenFileSet.add(str(aFile).lower()) + + # Get a list 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() + if not aFileName.endswith('.h'): + continue + if aFileName in localAutoGenFileSet: + continue + if localSourceDir not in aFileName: + continue + headerFileDependencySet.add(aFileName) + + # Check if a module dependency header file is missing from the mod= ule's MetaFile + for aFile in headerFileDependencySet: + if aFile in headerFilesInMetaFileSet: + continue + EdkLogger.warn("build","Module MetaFile [Sources] is missing l= ocal header!", + ExtraData =3D "Local Header: " + aFile + " not fou= nd in " + self._AutoGenObject.MetaFile.Path + ) + DepSet =3D None for File,Dependency in FileDependencyDict.items(): if not Dependency: --=20 2.19.1.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 (#41337): https://edk2.groups.io/g/devel/message/41337 Mute This Topic: https://groups.io/mt/31745161/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-