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 <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Reviewed-by: Yonghong Zhu <yonghong.zhu@intel.com>
This commit is contained in:
Liming Gao 2018-05-04 13:28:10 +08:00
parent 40d32e7942
commit 5d9af6a55a
1 changed files with 2 additions and 2 deletions

View File

@ -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