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=liming.gao@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 DB5C8223972C6 for ; Tue, 6 Feb 2018 18:04:29 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 18:10:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,471,1511856000"; d="scan'208";a="16504608" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by orsmga006.jf.intel.com with ESMTP; 06 Feb 2018 18:10:12 -0800 Received: from fmsmsx153.amr.corp.intel.com (10.18.125.6) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 6 Feb 2018 18:10:12 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by FMSMSX153.amr.corp.intel.com (10.18.125.6) with Microsoft SMTP Server (TLS) id 14.3.319.2; Tue, 6 Feb 2018 18:10:11 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.253]) with mapi id 14.03.0319.002; Wed, 7 Feb 2018 10:10:09 +0800 From: "Gao, Liming" To: "Zhu, Yonghong" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [Patch V2] BaseTools: Enhance error handling for unsupported toolchain Flags/Path Thread-Index: AQHTn7ay4jZKP2wxQUCHadsxRAjdPqOYMh5A Date: Wed, 7 Feb 2018 02:10:09 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1C890D@SHSMSX104.ccr.corp.intel.com> References: <1517968471-9324-1-git-send-email-yonghong.zhu@intel.com> In-Reply-To: <1517968471-9324-1-git-send-email-yonghong.zhu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [Patch V2] BaseTools: Enhance error handling for unsupported toolchain Flags/Path X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Feb 2018 02:04:30 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of >Yonghong Zhu >Sent: Wednesday, February 07, 2018 9:55 AM >To: edk2-devel@lists.01.org >Subject: [edk2] [Patch V2] BaseTools: Enhance error handling for unsupport= ed >toolchain Flags/Path > >Case1: Cover the Tool PATH is not exist, eg: build MdeModule under GCC5 >toolchain and IPF arch. >Case2: Cover the Tool FLAGS is not exist, eg: build OvmfPkg under >CLANG35 toolchain and X64 arch. > >fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=3D595 >Contributed-under: TianoCore Contribution Agreement 1.1 >Signed-off-by: Yonghong Zhu >--- > BaseTools/Source/Python/AutoGen/GenMake.py | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py >b/BaseTools/Source/Python/AutoGen/GenMake.py >index 9df5d8e..afe6f2f 100644 >--- a/BaseTools/Source/Python/AutoGen/GenMake.py >+++ b/BaseTools/Source/Python/AutoGen/GenMake.py >@@ -1,9 +1,9 @@ > ## @file > # Create makefile for MS nmake and GNU make > # >-# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
>+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
> # This program and the accompanying materials > # are licensed and made available under the terms and conditions of the B= SD >License > # which accompanies this distribution. The full text of the license may = be >found at > # http://opensource.org/licenses/bsd-license.php > # >@@ -796,13 +796,17 @@ cleanlib: > for Flag in FlagDict.keys(): > if '$('+ Flag +')' in SingleCommandList[0= ]: > Tool =3D Flag > break > if Tool: >+ if 'PATH' not in self._AutoGenObject._BuildOp= tion[Tool]: >+ EdkLogger.error("build", AUTOGEN_ERROR, "= %s_PATH >doesn't exist in %s ToolChain and %s Arch." %(Tool, >self._AutoGenObject.ToolChain, self._AutoGenObject.Arch), >ExtraData=3D"[%s]" % str(self._AutoGenObject)) > SingleCommandLength +=3D >len(self._AutoGenObject._BuildOption[Tool]['PATH']) > for item in SingleCommandList[1:]: > if FlagDict[Tool]['Macro'] in item: >+ if 'FLAGS' not in self._AutoGenObject= ._BuildOption[Tool]: >+ EdkLogger.error("build", AUTOGEN_= ERROR, "%s_FLAGS >doesn't exist in %s ToolChain and %s Arch." %(Tool, >self._AutoGenObject.ToolChain, self._AutoGenObject.Arch), >ExtraData=3D"[%s]" % str(self._AutoGenObject)) > Str =3D self._AutoGenObject._BuildOpt= ion[Tool]['FLAGS'] > for Option in self._AutoGenObject.Bui= ldOption.keys(): > for Attr in self._AutoGenObject.B= uildOption[Option]: > if Str.find(Option + '_' + At= tr) !=3D -1: > Str =3D Str.replace('$(' = + Option + '_' + Attr + ')', >self._AutoGenObject.BuildOption[Option][Attr]) >-- >2.6.1.windows.1 > >_______________________________________________ >edk2-devel mailing list >edk2-devel@lists.01.org >https://lists.01.org/mailman/listinfo/edk2-devel