From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.136; helo=mga12.intel.com; envelope-from=zhijux.fan@intel.com; receiver=edk2-devel@lists.01.org Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E00AF2194EB70 for ; Wed, 20 Feb 2019 17:33:59 -0800 (PST) X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Feb 2019 17:33:59 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,393,1544515200"; d="dat'59?scan'59,208,59";a="148552818" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga001.fm.intel.com with ESMTP; 20 Feb 2019 17:33:58 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 20 Feb 2019 17:33:58 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 20 Feb 2019 17:33:58 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.102]) with mapi id 14.03.0415.000; Thu, 21 Feb 2019 09:33:56 +0800 From: "Fan, ZhijuX" To: "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Feng, Bob C" Thread-Topic: [PATCH] BaseTools:Build fail if define [DEPEX] in library inf Thread-Index: AdTJhYFaDkr7MITDSrqhXQORvHCe0A== Date: Thu, 21 Feb 2019 01:33:55 +0000 Message-ID: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.400.15 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: [PATCH] BaseTools:Build fail if define [DEPEX] in library inf X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Feb 2019 01:34:00 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable When define [DEPEX] in lib inf to build, it will fail and report" gUefiOvmfPkgTokenSpaceGuid.test1 used in [Depex] section should be used as FixedAtBuild type and VOID* datum type in the module." But we define this PCD to FixedAtBuild type and VOID* datum type indeed. DEC: [PcdsFixedAtBuild] gUefiOvmfPkgTokenSpaceGuid.test1 | {GUID("4096267b-da0a-42eb-b5eb-fef31d207cb4")}|VOID*|0x3c DSC: add pcd under lib inf as below: NULL|TestPkg/TestLib/TestLib.inf gUefiOvmfPkgTokenSpaceGuid.test1 | {GUID(gUefiOvmfPkgTokenSpaceGuid)} Lib inf:(TestPkg/TestLib/TestLib.inf) [Depex] gUefiOvmfPkgTokenSpaceGuid.test1 [FixedPcd] gUefiOvmfPkgTokenSpaceGuid.test1 Cc: Bob Feng Cc: Liming Gao Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Zhiju.Fan --- BaseTools/Source/Python/AutoGen/AutoGen.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/BaseTools/Source/Python/AutoGen/AutoGen.py b/BaseTools/Source/= Python/AutoGen/AutoGen.py index 2452ecbcba..81361559b3 100644 --- a/BaseTools/Source/Python/AutoGen/AutoGen.py +++ b/BaseTools/Source/Python/AutoGen/AutoGen.py @@ -2892,10 +2892,16 @@ class ModuleAutoGen(AutoGen): if '.' not in item: NewList.append(item) else: - if item not in self.FixedVoidTypePcds: + FixedVoidTypePcds =3D {} + if item in self.FixedVoidTypePcds: + FixedVoidTypePcds =3D self.FixedVoidTypePcds + elif M in self.PlatformInfo.LibraryAutoGenList: + Index =3D self.PlatformInfo.LibraryAutoGenList= .index(M) + FixedVoidTypePcds =3D self.PlatformInfo.Librar= yAutoGenList[Index].FixedVoidTypePcds + if item not in FixedVoidTypePcds: EdkLogger.error("build", FORMAT_INVALID, "{} u= sed in [Depex] section should be used as FixedAtBuild type and VOID* datum = type in the module.".format(item)) else: - Value =3D self.FixedVoidTypePcds[item] + Value =3D FixedVoidTypePcds[item] if len(Value.split(',')) !=3D 16: EdkLogger.error("build", FORMAT_INVALID, "{} used in [Depex] sectio= n should be used as FixedAtBuild type and VOID* datum type and 16 bytes in = the module.".format(item)) --=20 2.14.1.windows.1