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.151; helo=mga17.intel.com; envelope-from=yonghong.zhu@intel.com; receiver=edk2-devel@lists.01.org Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) (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 44DE721F0DA54 for ; Tue, 6 Feb 2018 17:12:24 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Feb 2018 17:18:06 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.46,471,1511856000"; d="scan'208";a="199222493" Received: from shwdeopenpsi168.ccr.corp.intel.com ([10.239.158.129]) by orsmga005.jf.intel.com with ESMTP; 06 Feb 2018 17:18:05 -0800 From: Yonghong Zhu To: edk2-devel@lists.01.org Date: Wed, 7 Feb 2018 09:18:05 +0800 Message-Id: <1517966285-10236-1-git-send-email-yonghong.zhu@intel.com> X-Mailer: git-send-email 2.6.1.windows.1 Subject: [Patch] BaseTools: Enhance error handling for unsupported toolchain flags 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 01:12:24 -0000 fixes: https://bugzilla.tianocore.org/show_bug.cgi?id=595 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu --- BaseTools/Source/Python/AutoGen/GenMake.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py index 7d3374a..88edbe6 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 BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php # @@ -799,10 +799,12 @@ cleanlib: break if Tool: SingleCommandLength += 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." %(Tool, self._AutoGenObject.ToolChain), ExtraData="[%s]" % str(self._AutoGenObject)) Str = self._AutoGenObject._BuildOption[Tool]['FLAGS'] for Option in self._AutoGenObject.BuildOption.keys(): for Attr in self._AutoGenObject.BuildOption[Option]: if Str.find(Option + '_' + Attr) != -1: Str = Str.replace('$(' + Option + '_' + Attr + ')', self._AutoGenObject.BuildOption[Option][Attr]) -- 2.6.1.windows.1