mirror of https://github.com/acidanthera/audk.git
BaseTools: Enhance error handling for unsupported 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=595 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Yonghong Zhu <yonghong.zhu@intel.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
28fd7b090d
commit
70d0a7549e
|
@ -1,7 +1,7 @@
|
|||
## @file
|
||||
# Create makefile for MS nmake and GNU make
|
||||
#
|
||||
# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.<BR>
|
||||
# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.<BR>
|
||||
# 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
|
||||
|
@ -798,9 +798,13 @@ cleanlib:
|
|||
Tool = Flag
|
||||
break
|
||||
if Tool:
|
||||
if 'PATH' not in self._AutoGenObject._BuildOption[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="[%s]" % str(self._AutoGenObject))
|
||||
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 and %s Arch." %(Tool, self._AutoGenObject.ToolChain, self._AutoGenObject.Arch), 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]:
|
||||
|
|
Loading…
Reference in New Issue