From 5d9af6a55ae1fcd1bbd19b5c55f039e9556d5cec Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Fri, 4 May 2018 13:28:10 +0800 Subject: BaseTools: Retrieve /U and -U CC flags to structure PcdValueInit Makefile /D and -D flags have been added. So, /U and -U flags should be added. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Yonghong Zhu Reviewed-by: Yonghong Zhu --- BaseTools/Source/Python/Workspace/DscBuildData.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'BaseTools') diff --git a/BaseTools/Source/Python/Workspace/DscBuildData.py b/BaseTools/Source/Python/Workspace/DscBuildData.py index 627a157926..8476543c53 100644 --- a/BaseTools/Source/Python/Workspace/DscBuildData.py +++ b/BaseTools/Source/Python/Workspace/DscBuildData.py @@ -2057,11 +2057,11 @@ class DscBuildData(PlatformBuildClassObject): ValueList = Value.split() if ValueList: for Id, Item in enumerate(ValueList): - if Item == '-D' or Item == '/D': + if Item in ['-D', '/D', '-U', '/U']: CC_FLAGS += ' ' + Item if Id + 1 < len(ValueList): CC_FLAGS += ' ' + ValueList[Id + 1] - elif Item.startswith('/D') or Item.startswith('-D'): + elif Item.startswith(('-D', '/D', '-U', '/U')): CC_FLAGS += ' ' + Item MakeApp += CC_FLAGS -- cgit v1.2.3