From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=zhijux.fan@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 6DB0C208AE2C0 for ; Tue, 19 Feb 2019 19:23:26 -0800 (PST) X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 19 Feb 2019 19:23:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.58,388,1544515200"; d="dat'59?scan'59,208,59";a="134835792" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by FMSMGA003.fm.intel.com with ESMTP; 19 Feb 2019 19:23:25 -0800 Received: from fmsmsx125.amr.corp.intel.com (10.18.125.40) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Feb 2019 19:23:25 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by FMSMSX125.amr.corp.intel.com (10.18.125.40) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 19 Feb 2019 19:23:25 -0800 Received: from shsmsx101.ccr.corp.intel.com ([169.254.1.110]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.36]) with mapi id 14.03.0415.000; Wed, 20 Feb 2019 11:23:23 +0800 From: "Fan, ZhijuX" To: "edk2-devel@lists.01.org" CC: "Gao, Liming" , "Feng, Bob C" Thread-Topic: [edk2][PATCH] BaseTools:Build fail if define [DEPEX] in library inf Thread-Index: AdTIy6B8JAEUguf2TlyzBi9u1Id1CQ== Date: Wed, 20 Feb 2019 03:23:21 +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: Wed, 20 Feb 2019 03:23:26 -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 |=20 {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..e64be656e8 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 M in self.PlatformInfo.LibraryAutoGenList: + Index =3D self.PlatformInfo.LibraryAutoGenList= .index(M) + FixedVoidTypePcds =3D self.PlatformInfo.Librar= yAutoGenList[Index].FixedVoidTypePcds + if item in self.FixedVoidTypePcds: + FixedVoidTypePcds =3D self.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